1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 17:25:18 +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:
Alberto García Hierro 2017-09-10 19:40:20 +01:00
parent 5e6658b9d9
commit 622e4bf7dd
2 changed files with 11 additions and 1 deletions

View file

@ -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;
}