Trunk fmt

This commit is contained in:
ford-jones 2025-09-03 13:38:39 +12:00
parent 798040b5b8
commit c62f262f63
5 changed files with 24 additions and 27 deletions

View File

@ -65,10 +65,9 @@ SerialConsole::SerialConsole() : StreamAPI(&Port), RedirectablePrint(&Port), con
int32_t SerialConsole::runOnce() int32_t SerialConsole::runOnce()
{ {
#ifdef HELTEC_MESH_SOLAR #ifdef HELTEC_MESH_SOLAR
//After enabling the mesh solar serial port module configuration, command processing is handled by the serial port module. // After enabling the mesh solar serial port module configuration, command processing is handled by the serial port module.
if(moduleConfig.serial.enabled && moduleConfig.serial.override_console_serial_port if (moduleConfig.serial.enabled && moduleConfig.serial.override_console_serial_port &&
&& moduleConfig.serial.mode==meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG) moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG) {
{
return 250; return 250;
} }
#endif #endif

View File

@ -50,15 +50,15 @@ class StreamAPI : public PhoneAPI
* phone. * phone.
*/ */
virtual int32_t runOncePart(); virtual int32_t runOncePart();
virtual int32_t runOncePart(char *buf,uint16_t bufLen); virtual int32_t runOncePart(char *buf, uint16_t bufLen);
private: private:
/** /**
* Read any rx chars from the link and call handleToRadio * Read any rx chars from the link and call handleToRadio
*/ */
int32_t readStream(); int32_t readStream();
int32_t readStream(char *buf,uint16_t bufLen); int32_t readStream(char *buf, uint16_t bufLen);
int32_t handleRecStream(char *buf,uint16_t bufLen); int32_t handleRecStream(char *buf, uint16_t bufLen);
/** /**
* call getFromRadio() and deliver encapsulated packets to the Stream * call getFromRadio() and deliver encapsulated packets to the Stream

View File

@ -93,11 +93,10 @@
// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface // Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
// code) // code)
#define MODEM_POWER_EN 41 #define MODEM_POWER_EN 41
#define MODEM_PWRKEY 40 #define MODEM_PWRKEY 40
#define MODEM_RST 9 #define MODEM_RST 9
#define MODEM_RI 7 #define MODEM_RI 7
#define MODEM_DTR 8 #define MODEM_DTR 8
#define MODEM_RX 10 #define MODEM_RX 10
#define MODEM_TX 11 #define MODEM_TX 11

View File

@ -32,5 +32,5 @@ const uint32_t g_ADigitalPinMap[] = {
void initVariant() void initVariant()
{ {
pinMode(BQ4050_EMERGENCY_SHUTDOWN_PIN, INPUT); pinMode(BQ4050_EMERGENCY_SHUTDOWN_PIN, INPUT);
} }

View File

@ -39,16 +39,15 @@ extern "C" {
#define NUM_ANALOG_INPUTS (1) #define NUM_ANALOG_INPUTS (1)
#define NUM_ANALOG_OUTPUTS (0) #define NUM_ANALOG_OUTPUTS (0)
#define PIN_LED1 (0 + 12) // green (confirmed on 1.0 board) #define PIN_LED1 (0 + 12) // green (confirmed on 1.0 board)
#define LED_BLUE PIN_LED1 // fake for bluefruit library #define LED_BLUE PIN_LED1 // fake for bluefruit library
#define LED_GREEN PIN_LED1 #define LED_GREEN PIN_LED1
#define LED_BUILTIN LED_GREEN #define LED_BUILTIN LED_GREEN
#define LED_STATE_ON 0 // State when LED is lit #define LED_STATE_ON 0 // State when LED is lit
#define HAS_NEOPIXEL // Enable the use of neopixels #define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected #define NEOPIXEL_COUNT 1 // How many neopixels are connected
#define NEOPIXEL_DATA (32+15) // gpio pin used to send data to the neopixels #define NEOPIXEL_DATA (32 + 15) // gpio pin used to send data to the neopixels
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use #define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
/* /*
@ -74,13 +73,13 @@ No longer populated on PCB
// I2C bus 0 // I2C bus 0
// Routed to footprint for PCF8563TS RTC // Routed to footprint for PCF8563TS RTC
// Not populated on T114 V1, maybe in future? // Not populated on T114 V1, maybe in future?
#define PIN_WIRE_SDA (0 + 6) // P0.26 #define PIN_WIRE_SDA (0 + 6) // P0.26
#define PIN_WIRE_SCL (0 + 26) // P0.26 #define PIN_WIRE_SCL (0 + 26) // P0.26
// I2C bus 1 // I2C bus 1
// Available on header pins, for general use // Available on header pins, for general use
#define PIN_WIRE1_SDA (0 + 30) // P0.30 #define PIN_WIRE1_SDA (0 + 30) // P0.30
#define PIN_WIRE1_SCL (0 + 5) // P0.13 #define PIN_WIRE1_SCL (0 + 5) // P0.13
/* /*
* Lora radio * Lora radio
@ -89,14 +88,14 @@ No longer populated on PCB
#define USE_SX1262 #define USE_SX1262
// #define USE_SX1268 // #define USE_SX1268
#define SX126X_CS (0 + 24) // FIXME - we really should define LORA_CS instead #define SX126X_CS (0 + 24) // FIXME - we really should define LORA_CS instead
#define LORA_CS (0 + 24) #define LORA_CS (0 + 24)
#define SX126X_DIO1 (0 + 20) #define SX126X_DIO1 (0 + 20)
// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching // Note DIO2 is attached internally to the module to an analog switch for TX/RX switching
// #define SX1262_DIO3 (0 + 21) // #define SX1262_DIO3 (0 + 21)
// This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the // This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the
// main // main
// CPU? // CPU?
#define SX126X_BUSY (0 + 17) #define SX126X_BUSY (0 + 17)
#define SX126X_RESET (0 + 25) #define SX126X_RESET (0 + 25)
// Not really an E22 but TTGO seems to be trying to clone that // Not really an E22 but TTGO seems to be trying to clone that
#define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO2_AS_RF_SWITCH
@ -134,16 +133,16 @@ No longer populated on PCB
// For LORA, spi 0 // For LORA, spi 0
#define PIN_SPI_MISO (0 + 23) #define PIN_SPI_MISO (0 + 23)
#define PIN_SPI_MOSI (0 + 22) #define PIN_SPI_MOSI (0 + 22)
#define PIN_SPI_SCK (0 + 19) #define PIN_SPI_SCK (0 + 19)
// #define PIN_PWR_EN (0 + 6) // #define PIN_PWR_EN (0 + 6)
// To debug via the segger JLINK console rather than the CDC-ACM serial device // To debug via the segger JLINK console rather than the CDC-ACM serial device
// #define USE_SEGGER // #define USE_SEGGER
#define BQ4050_SDA_PIN (32+1) // I2C data line pin #define BQ4050_SDA_PIN (32 + 1) // I2C data line pin
#define BQ4050_SCL_PIN (32+0) // I2C clock line pin #define BQ4050_SCL_PIN (32 + 0) // I2C clock line pin
#define BQ4050_EMERGENCY_SHUTDOWN_PIN (32+3) // Emergency shutdown pin #define BQ4050_EMERGENCY_SHUTDOWN_PIN (32 + 3) // Emergency shutdown pin
#define HAS_RTC 0 #define HAS_RTC 0
#ifdef __cplusplus #ifdef __cplusplus