mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-09 22:48:12 +00:00
Add DISABLE_FLASH_SIZE_CHECK
This commit is contained in:
parent
a2213fd6dc
commit
d5346c0eaf
@ -201,7 +201,7 @@ static void __attribute__((unused)) DSM_build_data_packet(uint8_t upper)
|
|||||||
packet[i*2+5]=DSM_SerialRX_val[i+1];
|
packet[i*2+5]=DSM_SerialRX_val[i+1];
|
||||||
}
|
}
|
||||||
DSM_SerialRX=false;
|
DSM_SerialRX=false;
|
||||||
#if DSM_DEBUG_FWD_PGM
|
#ifdef DSM_DEBUG_FWD_PGM
|
||||||
debug("FWD=");
|
debug("FWD=");
|
||||||
for(uint8_t i=4; i<16;i++)
|
for(uint8_t i=4; i<16;i++)
|
||||||
debug(" %02X",packet[i]);
|
debug(" %02X",packet[i]);
|
||||||
@ -388,7 +388,7 @@ uint16_t ReadDsm()
|
|||||||
if(len>TELEMETRY_BUFFER_SIZE-2)
|
if(len>TELEMETRY_BUFFER_SIZE-2)
|
||||||
len=TELEMETRY_BUFFER_SIZE-2;
|
len=TELEMETRY_BUFFER_SIZE-2;
|
||||||
CYRF_ReadDataPacketLen(packet_in+1, len);
|
CYRF_ReadDataPacketLen(packet_in+1, len);
|
||||||
#if DSM_DEBUG_FWD_PGM
|
#ifdef DSM_DEBUG_FWD_PGM
|
||||||
//debug(" %02X", packet_in[1]);
|
//debug(" %02X", packet_in[1]);
|
||||||
if(packet_in[1]==9)
|
if(packet_in[1]==9)
|
||||||
{
|
{
|
||||||
|
@ -371,34 +371,36 @@ void setup()
|
|||||||
init_HWTimer(); //0.5us
|
init_HWTimer(); //0.5us
|
||||||
|
|
||||||
//Read module flash size
|
//Read module flash size
|
||||||
unsigned short *flashSize = (unsigned short *) (0x1FFFF7E0);// Address register
|
#ifndef DISABLE_FLASH_SIZE_CHECK
|
||||||
debugln("Module Flash size: %dKB",(int)(*flashSize & 0xffff));
|
unsigned short *flashSize = (unsigned short *) (0x1FFFF7E0);// Address register
|
||||||
if((int)(*flashSize & 0xffff) < 128) // Not supported by this project
|
debugln("Module Flash size: %dKB",(int)(*flashSize & 0xffff));
|
||||||
while (true) { //SOS
|
if((int)(*flashSize & 0xffff) < 128) // Not supported by this project
|
||||||
for(uint8_t i=0; i<3;i++)
|
while (true) { //SOS
|
||||||
{
|
for(uint8_t i=0; i<3;i++)
|
||||||
LED_on;
|
{
|
||||||
delay(100);
|
LED_on;
|
||||||
|
delay(100);
|
||||||
|
LED_off;
|
||||||
|
delay(100);
|
||||||
|
}
|
||||||
|
for(uint8_t i=0; i<3;i++)
|
||||||
|
{
|
||||||
|
LED_on;
|
||||||
|
delay(500);
|
||||||
|
LED_off;
|
||||||
|
delay(100);
|
||||||
|
}
|
||||||
|
for(uint8_t i=0; i<3;i++)
|
||||||
|
{
|
||||||
|
LED_on;
|
||||||
|
delay(100);
|
||||||
|
LED_off;
|
||||||
|
delay(100);
|
||||||
|
}
|
||||||
LED_off;
|
LED_off;
|
||||||
delay(100);
|
delay(1000);
|
||||||
}
|
}
|
||||||
for(uint8_t i=0; i<3;i++)
|
#endif
|
||||||
{
|
|
||||||
LED_on;
|
|
||||||
delay(500);
|
|
||||||
LED_off;
|
|
||||||
delay(100);
|
|
||||||
}
|
|
||||||
for(uint8_t i=0; i<3;i++)
|
|
||||||
{
|
|
||||||
LED_on;
|
|
||||||
delay(100);
|
|
||||||
LED_off;
|
|
||||||
delay(100);
|
|
||||||
}
|
|
||||||
LED_off;
|
|
||||||
delay(1000);
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
//ATMEGA328p
|
//ATMEGA328p
|
||||||
// all inputs
|
// all inputs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user