Skip to content

Commit

Permalink
Final commit for Release:
Browse files Browse the repository at this point in the history
er9x - 821
ersky9x - 219
eepe/eepskye - 421
  • Loading branch information
MikeBland committed Nov 30, 2016
1 parent 92b5d5d commit 048e583
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 17 deletions.
10 changes: 5 additions & 5 deletions Revisions.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
218
219
Revisions:
er9x -r820
ersky9x -r218
eepe -r420
eepskye -r420
er9x -r821
ersky9x -r219
eepe -r421
eepskye -r421
4 changes: 4 additions & 0 deletions radio/er9x/src/er9x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4330,6 +4330,10 @@ extern uint8_t serialDat0 ;
#if defined(CPUM128) || defined(CPUM2561)
lcd_puts_Pleft( FH, PSTR("Hardware Menu Enabled") ) ;
refreshDiplay() ;
if ( mcusr & (1<<WDRF) )
{
break ;
}
#endif
}
if ( in == 0x82 )
Expand Down
16 changes: 14 additions & 2 deletions radio/ersky9x/src/ersky9x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1704,9 +1704,21 @@ uint32_t updateSlave() ;

}

if ( ( read_trims() & 0x01 )== 0x01 )
while ( ( read_trims() & 0x01 )== 0x01 )
{
HardwareMenuEnabled = 1 ;
lcd_puts_Pleft( FH, XPSTR("Hardware Menu Enabled") ) ;
refreshDisplay() ;

#ifdef PCBSKY
if ( ( ( ResetReason & RSTC_SR_RSTTYP ) == (2 << 8) ) || unexpectedShutdown ) // Not watchdog
#endif
#if defined(PCBX9D) || defined(PCB9XT)
if ( ( ( ResetReason & RCC_CSR_WDGRSTF ) == RCC_CSR_WDGRSTF ) || unexpectedShutdown ) // Not watchdog
#endif
{
break ;
}
}

resetTimer();
Expand Down Expand Up @@ -6213,7 +6225,7 @@ void doSplash()
// SplashDebug[8] = 0 ;
//#endif

if( (!g_eeGeneral.disableSplashScreen) || ( HardwareMenuEnabled ) )
if( !g_eeGeneral.disableSplashScreen )
{
check_backlight() ;
lcd_clear();
Expand Down
36 changes: 27 additions & 9 deletions radio/ersky9x/src/mavlink/Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,9 @@ static inline uint8_t mavlink_msg_heartbeat_get_type(const mavlink_message_t* ms

static inline uint32_t mavlink_msg_heartbeat_get_custom_mode(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint32_t(msg, 0);
// return _MAV_RETURN_uint32_t(msg, 0);
uint32_t *p = (uint32_t *)((msg)->payload64) ;
return *p ;
}

static inline uint8_t mavlink_msg_heartbeat_get_base_mode(const mavlink_message_t* msg)
Expand All @@ -790,22 +792,30 @@ static inline uint8_t mavlink_msg_heartbeat_get_base_mode(const mavlink_message_

static inline int16_t mavlink_msg_sys_status_get_current_battery(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 16);
// return _MAV_RETURN_int16_t(msg, 16);
int16_t *p = (int16_t *)((msg)->payload64) ;
return p[8] ;
}

static inline float mavlink_msg_vfr_hud_get_alt(const mavlink_message_t* msg)
{
return _MAV_RETURN_float(msg, 8);
// return _MAV_RETURN_float(msg, 8);
float *p = (float *)((msg)->payload64) ;
return p[2] ;
}

static inline uint16_t mavlink_msg_hwstatus_get_Vcc(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 0);
// return _MAV_RETURN_uint16_t(msg, 0);
uint16_t *p = (uint16_t *)((msg)->payload64) ;
return p[0] ;
}

static inline uint16_t mavlink_msg_sys_status_get_load(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 12);
// return _MAV_RETURN_uint16_t(msg, 12);
uint16_t *p = (uint16_t *)((msg)->payload64) ;
return p[6] ;
}

static inline uint16_t mavlink_msg_sys_status_get_voltage_battery(const mavlink_message_t* msg)
Expand All @@ -815,7 +825,9 @@ static inline uint16_t mavlink_msg_sys_status_get_voltage_battery(const mavlink_

static inline int16_t mavlink_msg_vfr_hud_get_heading(const mavlink_message_t* msg)
{
return _MAV_RETURN_int16_t(msg, 16);
// return _MAV_RETURN_int16_t(msg, 16);
int16_t *p = (int16_t *)((msg)->payload64) ;
return p[8] ;
}

static inline float mavlink_msg_vfr_hud_get_climb(const mavlink_message_t* msg)
Expand All @@ -830,17 +842,23 @@ static inline int8_t mavlink_msg_sys_status_get_battery_remaining(const mavlink_

static inline int32_t mavlink_msg_gps_raw_int_get_lat(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 8);
// return _MAV_RETURN_int32_t(msg, 8);
int32_t *p = (int32_t *)((msg)->payload64) ;
return p[2] ;
}

static inline int32_t mavlink_msg_gps_raw_int_get_lon(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 12);
// return _MAV_RETURN_int32_t(msg, 12);
int32_t *p = (int32_t *)((msg)->payload64) ;
return p[3] ;
}

static inline int32_t mavlink_msg_gps_raw_int_get_alt(const mavlink_message_t* msg)
{
return _MAV_RETURN_int32_t(msg, 16);
// return _MAV_RETURN_int32_t(msg, 16);
int32_t *p = (int32_t *)((msg)->payload64) ;
return p[4] ;
}
static inline uint16_t mavlink_msg_gps_raw_int_get_epv(const mavlink_message_t* msg)
{
Expand Down
2 changes: 2 additions & 0 deletions radio/ersky9x/src/menus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11852,6 +11852,8 @@ void menuProcS6R(uint8_t event)
{
lcd_putsAttIdx( 12*FW, 3*FH, XPSTR("\006Hor HorRevVer VerRev"), value, 0 ) ;
}
lcd_img( 12, 4*FH, value<2 ? S6Rimg1 : S6Rimg3, value<3 ? value & 1 : 2, 0 ) ;
lcd_puts_Pleft( 7*FH, "<-Heading" ) ;
break ;
case 3 :
case 4 :
Expand Down
9 changes: 8 additions & 1 deletion radio/ersky9x/src/s6rimg.lbm
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,12 @@ PROGMEM S6Rimg3[] = {
0xFF,0x00,0x00,0x00,0x00,0x00,0x31,0x4A,0x4C,0x7F,0x00,0x26,0x49,0x49,0x3E,0x00,
0x26,0x49,0x49,0x49,0x32,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x80,0x7F,
0x07,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x07,0x02,0x01,0x00,0x00
0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x07,0x02,0x01,0x00,0x00,

0xF0,0x18,0x14,0x12,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0xF1,0x09,0x25,0x03,0xFF,
0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x22,0x80,0x7F,
0x07,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x07,0x02,0x01,0x00,0x00,
};

0 comments on commit 048e583

Please sign in to comment.