some fixes for DEBUG
This commit is contained in:
committed by
Raphael Coeffic
parent
2b2a4479e4
commit
69955e5dd1
@@ -1279,6 +1279,8 @@ int cliDisplay(const char ** argv)
|
|||||||
cliSerialPrint("[%s] = %s", STR_VKEYS[i]+1, keys[i].state() ? "on" : "off");
|
cliSerialPrint("[%s] = %s", STR_VKEYS[i]+1, keys[i].state() ? "on" : "off");
|
||||||
}
|
}
|
||||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||||
|
typedef int32_t rotenc_t;
|
||||||
|
extern volatile rotenc_t rotencValue;
|
||||||
cliSerialPrint("[Enc.] = %d", rotencValue / ROTARY_ENCODER_GRANULARITY);
|
cliSerialPrint("[Enc.] = %d", rotencValue / ROTARY_ENCODER_GRANULARITY);
|
||||||
#endif
|
#endif
|
||||||
for (int i=TRM_BASE; i<=TRM_LAST; i++) {
|
for (int i=TRM_BASE; i<=TRM_LAST; i++) {
|
||||||
|
|||||||
+12
-2
@@ -25,11 +25,17 @@
|
|||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "aux_serial_driver.h"
|
#include "aux_serial_driver.h"
|
||||||
#include "hal/serial_port.h"
|
#include "hal/serial_port.h"
|
||||||
|
|
||||||
#include "opentx.h"
|
#if !defined(BOOT)
|
||||||
#include "lua/lua_api.h"
|
#include "opentx.h"
|
||||||
|
#include "lua/lua_api.h"
|
||||||
|
#else
|
||||||
|
#include "dataconstants.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PRINTF_BUFFER_SIZE 128
|
#define PRINTF_BUFFER_SIZE 128
|
||||||
|
|
||||||
@@ -285,6 +291,7 @@ static void serialSetPowerState(uint8_t port_nr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(BOOT)
|
||||||
void serialSetPower(uint8_t port_nr, bool enabled)
|
void serialSetPower(uint8_t port_nr, bool enabled)
|
||||||
{
|
{
|
||||||
if (port_nr >= MAX_SERIAL_PORTS) return;
|
if (port_nr >= MAX_SERIAL_PORTS) return;
|
||||||
@@ -295,6 +302,7 @@ void serialSetPower(uint8_t port_nr, bool enabled)
|
|||||||
|
|
||||||
serialSetPowerState(port_nr);
|
serialSetPowerState(port_nr);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void serialInit(uint8_t port_nr, int mode)
|
void serialInit(uint8_t port_nr, int mode)
|
||||||
{
|
{
|
||||||
@@ -366,6 +374,7 @@ bool serialGetPower(uint8_t port_nr)
|
|||||||
return getSerialPower(port_nr);
|
return getSerialPower(port_nr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(BOOT)
|
||||||
void serialSetMode(uint8_t port_nr, int mode)
|
void serialSetMode(uint8_t port_nr, int mode)
|
||||||
{
|
{
|
||||||
if (port_nr >= MAX_SERIAL_PORTS) return;
|
if (port_nr >= MAX_SERIAL_PORTS) return;
|
||||||
@@ -375,6 +384,7 @@ void serialSetMode(uint8_t port_nr, int mode)
|
|||||||
~(SERIAL_CONF_MODE_MASK << port_nr * SERIAL_CONF_BITS_PER_PORT)) |
|
~(SERIAL_CONF_MODE_MASK << port_nr * SERIAL_CONF_BITS_PER_PORT)) |
|
||||||
(m << port_nr * SERIAL_CONF_BITS_PER_PORT);
|
(m << port_nr * SERIAL_CONF_BITS_PER_PORT);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// uint8_t serialTracesEnabled(int port_nr)
|
// uint8_t serialTracesEnabled(int port_nr)
|
||||||
// {
|
// {
|
||||||
|
|||||||
Reference in New Issue
Block a user