1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

takin' a look

This commit is contained in:
nathan 2016-06-13 22:45:53 -07:00
parent 3c84c169c2
commit 0fd8774d50
28 changed files with 1674 additions and 63 deletions

View file

@ -44,6 +44,8 @@
#include "drivers/gyro_sync.h"
#include "drivers/sdcard.h"
#include "drivers/buf_writer.h"
#include "drivers/max7456.h"
#include "drivers/rtc6705.h"
#include "rx/rx.h"
#include "rx/msp.h"
@ -57,6 +59,7 @@
#include "io/flashfs.h"
#include "io/transponder_ir.h"
#include "io/asyncfatfs/asyncfatfs.h"
#include "io/osd.h"
#include "io/vtx.h"
#include "telemetry/telemetry.h"
@ -1255,7 +1258,9 @@ static bool processInCommand(void)
uint8_t wp_no;
int32_t lat = 0, lon = 0, alt = 0;
#endif
#ifdef OSD
uint8_t addr, font_data[64];
#endif
switch (currentPort->cmdMSP) {
case MSP_SELECT_SETTING:
if (!ARMING_FLAG(ARMED)) {
@ -1516,6 +1521,32 @@ static bool processInCommand(void)
transponderUpdateData(masterConfig.transponderData);
break;
#endif
#ifdef OSD
case MSP_SET_OSD_CONFIG:
masterConfig.osdProfile.system = read8();
for (i = 0; i < OSD_MAX_ITEMS; i++)
masterConfig.osdProfile.item_pos[i] = read16();
break;
case MSP_OSD_CHAR_WRITE:
addr = read8();
for (i = 0; i < 54; i++) {
font_data[i] = read8();
}
max7456_write_nvm(addr, font_data);
break;
#endif
#ifdef USE_RTC6705
case MSP_SET_VTX_CONFIG:
tmp = read16();
if (tmp < 40)
masterConfig.vtx_channel = tmp;
if (current_vtx_channel != masterConfig.vtx_channel) {
current_vtx_channel = masterConfig.vtx_channel;
rtc6705_set_channel(vtx_freq[current_vtx_channel]);
}
break;
#endif
#ifdef USE_FLASHFS
case MSP_DATAFLASH_ERASE: