mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
Rename MSP2_INAV_TZ and MSP2_INAV_SET_TZ
MSP2_COMMON_TZ and MSP2_COMMON_SET_TZ are the new names. Also, move the definitions to the file msp_protocol_v2_common.h
This commit is contained in:
parent
aff0bd9e38
commit
8158d555fa
4 changed files with 22 additions and 4 deletions
|
@ -1333,7 +1333,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
|
|||
}
|
||||
break;
|
||||
|
||||
case MSP2_INAV_TZ:
|
||||
case MSP2_COMMON_TZ:
|
||||
sbufWriteU16(dst, (uint16_t)timeConfig()->tz_offset);
|
||||
break;
|
||||
|
||||
|
@ -2132,7 +2132,7 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
|
|||
}
|
||||
break;
|
||||
|
||||
case MSP2_INAV_SET_TZ:
|
||||
case MSP2_COMMON_SET_TZ:
|
||||
timeConfigMutable()->tz_offset = (int16_t)sbufReadU16(src);
|
||||
break;
|
||||
|
||||
|
|
|
@ -323,4 +323,5 @@
|
|||
#define MSP_SET_RTC 247 //in message Sets the RTC clock (args: secs(i32) millis(u16))
|
||||
|
||||
// MSPv2 includes
|
||||
#include "msp_protocol_v2_common.h"
|
||||
#include "msp_protocol_v2_inav.h"
|
19
src/main/msp/msp_protocol_v2_common.h
Normal file
19
src/main/msp/msp_protocol_v2_common.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* This file is part of INAV
|
||||
*
|
||||
* INAV is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* INAV is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define MSP2_COMMON_TZ 0x1001 //out message Gets the TZ offset for the local time (returns: minutes(i16))
|
||||
#define MSP2_COMMON_SET_TZ 0x1002 //in message Sets the TZ offset for the local time (args: minutes(i16))
|
|
@ -16,5 +16,3 @@
|
|||
*/
|
||||
|
||||
//#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