mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 09:45:33 +03:00
Add MSP2_INAV_TZ and MSP2_INAV_SET_TZ MSP commands
MSPv2 only, defined as 0x1001 and 0x1002
This commit is contained in:
parent
5e6658b9d9
commit
622e4bf7dd
2 changed files with 11 additions and 1 deletions
|
@ -1333,6 +1333,10 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
|
|||
}
|
||||
break;
|
||||
|
||||
case MSP2_INAV_TZ:
|
||||
sbufWriteU16(dst, (uint16_t)timeConfig()->tz_offset);
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -2128,6 +2132,10 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
|
|||
}
|
||||
break;
|
||||
|
||||
case MSP2_INAV_SET_TZ:
|
||||
timeConfigMutable()->tz_offset = (int16_t)sbufReadU16(src);
|
||||
break;
|
||||
|
||||
default:
|
||||
return MSP_RESULT_ERROR;
|
||||
}
|
||||
|
|
|
@ -16,3 +16,5 @@
|
|||
*/
|
||||
|
||||
//#define MSP2_INAV_STATUS 0x1000
|
||||
#define MSP2_INAV_TZ 0x1001 //out message Gets the TZ offset for the local time (returns: minutes(i16))
|
||||
#define MSP2_INAV_SET_TZ 0x1002 //in message Sets the TZ offset for the local time (args: minutes(i16))
|
Loading…
Add table
Add a link
Reference in a new issue