update
This commit is contained in:
parent
ddba2120e1
commit
0f80e087da
@ -158,11 +158,14 @@ int cmd_clearlog(char* line, void* cli)
|
||||
}
|
||||
|
||||
const CMD_t Commands[] = {
|
||||
{ "history", &cmd_history },
|
||||
#if TARGET == TARGET_RX
|
||||
{ "d", &cmd_contrl },
|
||||
{ "shutdown", &cmd_shutdown },
|
||||
{ "status", &cmd_status },
|
||||
#elif TARGET == TARGET_TX
|
||||
{ "led", &setLed },
|
||||
#endif
|
||||
{ "history", &cmd_history },
|
||||
{ "shutdown", &cmd_shutdown },
|
||||
{ "log", &cmd_showlog },
|
||||
{ "logclear", &cmd_clearlog }
|
||||
};
|
||||
|
||||
@ -14,12 +14,13 @@
|
||||
#include "utils.h"
|
||||
#include "commands.h"
|
||||
#include "wifi.h"
|
||||
#include "servos.h"
|
||||
#include "logger.h"
|
||||
#include "ws.h"
|
||||
#if TARGET == TARGET_TX
|
||||
#include "led.h"
|
||||
#include "adc.h"
|
||||
#elif TARGET == TARGET_RX
|
||||
#include "servos.h"
|
||||
#endif
|
||||
|
||||
bool volatile running = true;
|
||||
@ -70,28 +71,6 @@ int charOut_ws(const char* c)
|
||||
ws_putchar(ws_client, *c);
|
||||
return 0;
|
||||
}
|
||||
#elif TARGET == TARGET_TX
|
||||
int charOut_ws0(const char* c)
|
||||
{
|
||||
ws_putchar(ws_client[0], *c);
|
||||
return 0;
|
||||
}
|
||||
int charOut_ws1(const char* c)
|
||||
{
|
||||
ws_putchar(ws_client[1], *c);
|
||||
return 0;
|
||||
}
|
||||
int charOut_ws2(const char* c)
|
||||
{
|
||||
ws_putchar(ws_client[2], *c);
|
||||
return 0;
|
||||
}
|
||||
|
||||
CLI_charOutFn charOut_ws[3] = {
|
||||
&charOut_ws0,
|
||||
&charOut_ws1,
|
||||
&charOut_ws2
|
||||
};
|
||||
#endif
|
||||
|
||||
void app_main() {
|
||||
@ -112,8 +91,9 @@ void app_main() {
|
||||
#if TARGET == TARGET_TX
|
||||
led_init();
|
||||
led_setRGB(0, 0, 20);
|
||||
#endif
|
||||
#elif TARGET == TARGET_RX
|
||||
servo_init();
|
||||
#endif
|
||||
|
||||
wifiInit();
|
||||
bool adc_inited = false;
|
||||
|
||||
BIN
tx_case/tx_case.FCStd
Normal file
BIN
tx_case/tx_case.FCStd
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user