diff --git a/flight/OpenPilot/Modules/Osd/OsdEtStd/OsdEtStd.c b/flight/OpenPilot/Modules/Osd/OsdEtStd/OsdEtStd.c index a334ef494..8851b5890 100644 --- a/flight/OpenPilot/Modules/Osd/OsdEtStd/OsdEtStd.c +++ b/flight/OpenPilot/Modules/Osd/OsdEtStd/OsdEtStd.c @@ -48,7 +48,7 @@ #define STACK_SIZE 1024 #define TASK_PRIORITY (tskIDLE_PRIORITY + 3) #define ENABLE_DEBUG_MSG -//#define DUMP_CONFIG // Enable this do read and dump the OSD config +#define DUMP_CONFIG // Enable this do read and dump the OSD config //#define WRITE_CONFIG // Enable this do write and verify the OSD config //#define DO_PAR_SEEK // Enable this to start a tool to find where parameters are encoded @@ -230,7 +230,7 @@ static void DumpConfig(void) DEBUG_MSG("0x%02x, ", buf[i]); #else page=(addr/0x78)+1; - DEBUG_MSG("\rstatic uint8_t addr%02d[] = { ",page); + DEBUG_MSG("static uint8_t addr%02d[] = { ",page); DEBUG_MSG("0x01, 0x7d, 0x%02x, 0x%02x, 0x%02x, ",(uint8_t)(addr & 0xFF), (uint8_t)(addr >> 8), n); for(i=0; i<(n-1); i++) DEBUG_MSG("0x%02x, ", buf[i]); @@ -272,10 +272,82 @@ static void DumpConfig(void) // } // } } + + +static void DumpSlots(void) +{ + uint8_t buf[24]; + uint32_t addr=0x13b4; + uint32_t n=24; + bool ok; + + while (addr>0)&0x01); + DEBUG_MSG("page: %d, position: 0x%02x, 0x%02x, ", buf[15], buf[21],buf[22]); + DEBUG_MSG("hLimEn: %d, lLimEn: %d, autoSW: %d, limit: %d, Raw: ", (buf[4]>>4)&0x01, (buf[4]>>3)&0x01, (buf[4]>>1)&0x01, (((uint16_t)buf[13])<<8)+buf[12]); + for(uint32_t i=0; i>1)&0x01); + DEBUG_MSG("osdRXon %d, ",(buf[15]>>0)&0x01); + DEBUG_MSG("req3Dfix %d, ",(buf[15]>>4)&0x01); + DEBUG_MSG("pageTime %d, ",buf[7]); + DEBUG_MSG("MaxVsLive %d, ",buf[8]); + DEBUG_MSG("reqSats %d, ",buf[9]); + DEBUG_MSG("waitAfterFix %d, ",buf[26]); + DEBUG_MSG("RXpageSw %d, ",(buf[6]&0x03)==0x03?1:0); + DEBUG_MSG("RAW: "); + for(uint32_t i=0; i