* NRF52BoardDCDC constructor chain fixes

This commit is contained in:
Scott Powell
2026-08-12 13:37:42 +10:00
parent e027263d1e
commit 3b8a67938f
33 changed files with 38 additions and 36 deletions
+6 -4
View File
@@ -31,7 +31,7 @@ class NRF52Board : public mesh::MainBoard {
protected:
uint8_t startup_reason;
char *ota_name;
const char *ota_name;
#ifdef NRF52_POWER_MANAGEMENT
uint32_t reset_reason; // RESETREAS register value
@@ -45,7 +45,7 @@ protected:
#endif
public:
NRF52Board(char *otaname) : ota_name(otaname) {}
NRF52Board(const char *otaname) : ota_name(otaname) {}
virtual void begin();
virtual uint8_t getStartupReason() const override { return startup_reason; }
virtual float getMCUTemperature() override;
@@ -73,9 +73,11 @@ public:
* hardware requirements are met, this subclass can be used to enable the DC/DC
* regulator.
*/
class NRF52BoardDCDC : virtual public NRF52Board {
class NRF52BoardDCDC : public NRF52Board {
public:
NRF52BoardDCDC() {}
NRF52BoardDCDC() : NRF52Board(NULL) {}
NRF52BoardDCDC(const char *otaname) : NRF52Board(otaname) {}
virtual void begin() override;
};
#endif
@@ -12,7 +12,7 @@ protected:
#endif
public:
GAT56230SMeshKitBoard() : NRF52Board("GAT562_OTA") {}
GAT56230SMeshKitBoard() : NRF52BoardDCDC("GAT562_OTA") {}
void begin();
#define BATTERY_SAMPLES 8
@@ -12,7 +12,7 @@ protected:
#endif
public:
GAT562EVBProBoard() : NRF52Board("GAT562_OTA") {}
GAT562EVBProBoard() : NRF52BoardDCDC("GAT562_OTA") {}
void begin();
#define BATTERY_SAMPLES 8
@@ -12,7 +12,7 @@ protected:
#endif
public:
GAT562MeshTrackerProBoard() : NRF52Board("GAT562_OTA") {}
GAT562MeshTrackerProBoard() : NRF52BoardDCDC("GAT562_OTA") {}
void begin();
#define BATTERY_SAMPLES 8
@@ -12,7 +12,7 @@ protected:
#endif
public:
GAT56MeshWatch13Board() : NRF52Board("GAT562_OTA") {}
GAT56MeshWatch13Board() : NRF52BoardDCDC("GAT562_OTA") {}
void begin();
#define BATTERY_SAMPLES 8
+1 -1
View File
@@ -22,7 +22,7 @@
class MeshSolarBoard : public NRF52BoardDCDC {
public:
MeshSolarBoard() : NRF52Board("MESH_SOLAR_OTA") {}
MeshSolarBoard() : NRF52BoardDCDC("MESH_SOLAR_OTA") {}
void begin();
uint16_t getBattMilliVolts() override {
+1 -1
View File
@@ -17,7 +17,7 @@ public:
RefCountedDigitalPin periph_power;
LoRaFEMControl loRaFEMControl;
T096Board() :periph_power(PIN_VEXT_EN,PIN_VEXT_EN_ACTIVE), NRF52Board("T096_OTA") {}
T096Board() : NRF52BoardDCDC("T096_OTA"), periph_power(PIN_VEXT_EN,PIN_VEXT_EN_ACTIVE) {}
void begin();
void onBeforeTransmit(void) override;
+1 -1
View File
@@ -15,7 +15,7 @@ protected:
public:
RefCountedDigitalPin periph_power;
T1Board() : periph_power(PIN_TFT_VDD_CTL, PIN_TFT_VDD_CTL_ACTIVE), NRF52Board("T1_OTA") {}
T1Board() : NRF52BoardDCDC("T1_OTA"), periph_power(PIN_TFT_VDD_CTL, PIN_TFT_VDD_CTL_ACTIVE) {}
void begin();
void onBeforeTransmit() override;
+1 -1
View File
@@ -16,7 +16,7 @@ protected:
#endif
public:
T114Board() : NRF52Board("T114_OTA") {}
T114Board() : NRF52BoardDCDC("T114_OTA") {}
void begin();
#if defined(P_LORA_TX_LED)
@@ -14,7 +14,7 @@ protected:
public:
LoRaFEMControl loRaFEMControl;
HeltecTowerV2Board() : NRF52Board("TOWER_V2_OTA") {}
HeltecTowerV2Board() : NRF52BoardDCDC("TOWER_V2_OTA") {}
void begin();
void onBeforeTransmit() override;
void onAfterTransmit() override;
@@ -8,7 +8,7 @@
class IkokaNrf52Board : public NRF52BoardDCDC {
public:
IkokaNrf52Board() : NRF52Board("XIAO_NRF52_OTA") {}
IkokaNrf52Board() : NRF52BoardDCDC("XIAO_NRF52_OTA") {}
void begin();
#if defined(P_LORA_TX_LED)
+1 -1
View File
@@ -8,7 +8,7 @@
class IkokaNanoNRFBoard : public NRF52BoardDCDC {
public:
IkokaNanoNRFBoard() : NRF52Board("XIAO_NRF52_OTA") {}
IkokaNanoNRFBoard() : NRF52BoardDCDC("XIAO_NRF52_OTA") {}
void begin();
#if defined(P_LORA_TX_LED)
@@ -8,7 +8,7 @@
class IkokaStickNRFBoard : public NRF52BoardDCDC {
public:
IkokaStickNRFBoard() : NRF52Board("XIAO_NRF52_OTA") {}
IkokaStickNRFBoard() : NRF52BoardDCDC("XIAO_NRF52_OTA") {}
void begin();
#if defined(P_LORA_TX_LED)
@@ -9,7 +9,7 @@ protected:
uint8_t btn_prev_state;
public:
TImpulsePlusBoard() : NRF52Board("T-Impulse-Plus OTA") {}
TImpulsePlusBoard() : NRF52BoardDCDC("T-Impulse-Plus OTA") {}
void begin();
#if defined(P_LORA_TX_LED)
+1 -1
View File
@@ -15,7 +15,7 @@
class TechoBoard : public NRF52BoardDCDC {
public:
TechoBoard() : NRF52Board("TECHO_OTA") {}
TechoBoard() : NRF52BoardDCDC("TECHO_OTA") {}
void begin();
uint16_t getBattMilliVolts() override;
+1 -1
View File
@@ -17,7 +17,7 @@
class TechoCardBoard : public NRF52BoardDCDC {
bool _torchStatus = false;
public:
TechoCardBoard() : NRF52Board("TECHO_OTA") {}
TechoCardBoard() : NRF52BoardDCDC("TECHO_OTA") {}
void begin();
uint16_t getBattMilliVolts() override;
void onBeforeTransmit(void) override;
+1 -1
View File
@@ -13,7 +13,7 @@
class TechoBoard : public NRF52BoardDCDC {
public:
TechoBoard() : NRF52Board("TECHO_OTA") {}
TechoBoard() : NRF52BoardDCDC("TECHO_OTA") {}
void begin();
uint16_t getBattMilliVolts() override;
+1 -1
View File
@@ -11,7 +11,7 @@
class HeltecMeshPocket : public NRF52BoardDCDC {
public:
HeltecMeshPocket() : NRF52Board("MESH_POCKET_OTA") {}
HeltecMeshPocket() : NRF52BoardDCDC("MESH_POCKET_OTA") {}
void begin();
uint16_t getBattMilliVolts() override {
+1 -1
View File
@@ -9,7 +9,7 @@ protected:
uint8_t btn_prev_state;
public:
MeshtinyBoard() : NRF52Board("Meshtiny OTA") {}
MeshtinyBoard() : NRF52BoardDCDC("Meshtiny OTA") {}
void begin();
#if defined(P_LORA_TX_LED)
+1 -1
View File
@@ -9,7 +9,7 @@ protected:
uint8_t btn_prev_state;
public:
MeshTrackerX1Board() : NRF52Board("X1_OTA") {}
MeshTrackerX1Board() : NRF52BoardDCDC("X1_OTA") {}
void begin();
uint16_t getBattMilliVolts() override {
@@ -25,7 +25,7 @@ protected:
uint8_t btn_prev_state;
public:
MinewsemiME25LS01Board() : NRF52Board("Minewsemi_OTA") {}
MinewsemiME25LS01Board() : NRF52BoardDCDC("Minewsemi_OTA") {}
void begin();
#define BATTERY_SAMPLES 8
+1 -1
View File
@@ -15,7 +15,7 @@ protected:
#endif
public:
R1NeoBoard() : NRF52Board("R1NEO_OTA") {}
R1NeoBoard() : NRF52BoardDCDC("R1NEO_OTA") {}
void begin();
#ifdef NRF52_POWER_MANAGEMENT
+1 -1
View File
@@ -13,7 +13,7 @@ protected:
float adc_mult = ADC_MULTIPLIER;
public:
PromicroBoard() : NRF52Board("ProMicro_OTA") {}
PromicroBoard() : NRF52BoardDCDC("ProMicro_OTA") {}
void begin();
#define BATTERY_SAMPLES 8
+1 -1
View File
@@ -17,7 +17,7 @@ protected:
void initiateShutdown(uint8_t reason) override;
#endif
public:
RAK3401Board() : NRF52Board("RAK3401_OTA") {}
RAK3401Board() : NRF52BoardDCDC("RAK3401_OTA") {}
void begin();
#define BATTERY_SAMPLES 8
+1 -1
View File
@@ -15,7 +15,7 @@ protected:
#endif
public:
RAK4631Board() : NRF52Board("RAK4631_OTA") {}
RAK4631Board() : NRF52BoardDCDC("RAK4631_OTA") {}
void begin();
#define BATTERY_SAMPLES 8
@@ -10,7 +10,7 @@
class RAKWismeshTagBoard : public NRF52BoardDCDC {
public:
RAKWismeshTagBoard() : NRF52Board("WISMESHTAG_OTA") {}
RAKWismeshTagBoard() : NRF52BoardDCDC("WISMESHTAG_OTA") {}
void begin();
#if defined(P_LORA_TX_LED) && defined(LED_STATE_ON)
+1 -1
View File
@@ -11,7 +11,7 @@ protected:
#endif
public:
SenseCapSolarBoard() : NRF52Board("SENSECAP_SOLAR_OTA") {}
SenseCapSolarBoard() : NRF52BoardDCDC("SENSECAP_SOLAR_OTA") {}
void begin();
#if defined(P_LORA_TX_LED)
+1 -1
View File
@@ -9,7 +9,7 @@ protected:
uint8_t btn_prev_state;
public:
T1000eBoard() : NRF52Board("T1000E_OTA") {}
T1000eBoard() : NRF52BoardDCDC("T1000E_OTA") {}
void begin();
uint16_t getBattMilliVolts() override {
+1 -1
View File
@@ -14,7 +14,7 @@ protected:
uint8_t btn_prev_state;
public:
ThinkNodeM3Board() : NRF52Board("THINKNODE_M3_OTA") {}
ThinkNodeM3Board() : NRF52BoardDCDC("THINKNODE_M3_OTA") {}
void begin();
uint16_t getBattMilliVolts() override;
+1 -1
View File
@@ -19,7 +19,7 @@ protected:
#endif
public:
ThinkNodeM6Board() : NRF52Board("THINKNODE_M6_OTA") {}
ThinkNodeM6Board() : NRF52BoardDCDC("THINKNODE_M6_OTA") {}
void begin();
uint16_t getBattMilliVolts() override;
+1 -1
View File
@@ -9,7 +9,7 @@ protected:
uint8_t btn_prev_state;
public:
WioTrackerL1Board() : NRF52Board("WioTrackerL1 OTA") {}
WioTrackerL1Board() : NRF52BoardDCDC("WioTrackerL1 OTA") {}
void begin();
#if defined(P_LORA_TX_LED)
+1 -1
View File
@@ -13,7 +13,7 @@
class WioWM1110Board : public NRF52BoardDCDC {
public:
WioWM1110Board() : NRF52Board("WM1110_OTA") {}
WioWM1110Board() : NRF52BoardDCDC("WM1110_OTA") {}
void begin();
#if defined(LED_GREEN)
+1 -1
View File
@@ -17,7 +17,7 @@ protected:
#endif
public:
XiaoNrf52Board() : NRF52Board("XIAO_NRF52_OTA") {}
XiaoNrf52Board() : NRF52BoardDCDC("XIAO_NRF52_OTA") {}
void begin();
#if defined(P_LORA_TX_LED)