Ikoka Stick: Move to unified code naming conventions

This commit is contained in:
kelsey hudson 2025-09-07 21:29:10 -07:00
parent 951d2dfdbb
commit 7b08acf56d
4 changed files with 11 additions and 16 deletions

View file

@ -1,28 +1,26 @@
#ifdef XIAO_NRF52
#include <Arduino.h>
#include "ikoka_stick_nrf_board.h"
#include "IkokaStickNRFBoard.h"
#include <bluefruit.h>
#include <Wire.h>
static BLEDfu bledfu;
static void connect_callback(uint16_t conn_handle)
{
static void connect_callback(uint16_t conn_handle) {
(void)conn_handle;
MESH_DEBUG_PRINTLN("BLE client connected");
}
static void disconnect_callback(uint16_t conn_handle, uint8_t reason)
{
static void disconnect_callback(uint16_t conn_handle, uint8_t reason) {
(void)conn_handle;
(void)reason;
MESH_DEBUG_PRINTLN("BLE client disconnected");
}
void ikoka_stick_nrf_board::begin() {
void IkokaStickNRFBoard::begin() {
// for future use, sub-classes SHOULD call this from their begin()
startup_reason = BD_STARTUP_NORMAL;
@ -50,7 +48,7 @@ void ikoka_stick_nrf_board::begin() {
delay(10); // give sx1262 some time to power up
}
bool ikoka_stick_nrf_board::startOTAUpdate(const char* id, char reply[]) {
bool IkokaStickNRFBoard::startOTAUpdate(const char *id, char reply[]) {
// Config the peripheral connection with maximum bandwidth
// more SRAM required by SoftDevice
// Note: All config***() function must be called before begin()
@ -91,9 +89,6 @@ bool ikoka_stick_nrf_board::startOTAUpdate(const char* id, char reply[]) {
strcpy(reply, "OK - started");
return true;
return false;
}
#endif

View file

@ -5,7 +5,7 @@
#ifdef XIAO_NRF52
class ikoka_stick_nrf_board : public mesh::MainBoard {
class IkokaStickNRFBoard : public mesh::MainBoard {
protected:
uint8_t startup_reason;
@ -46,7 +46,7 @@ public:
return (adcvalue * ADC_MULTIPLIER * AREF_VOLTAGE) / 4.096;
}
const char* getManufacturerName() const override {
const char *getManufacturerName() const override {
return MANUFACTURER_STRING;
}
@ -54,7 +54,7 @@ public:
NVIC_SystemReset();
}
bool startOTAUpdate(const char* id, char reply[]) override;
bool startOTAUpdate(const char *id, char reply[]) override;
};
#endif

View file

@ -2,7 +2,7 @@
#include "target.h"
#include <helpers/ArduinoHelpers.h>
ikoka_stick_nrf_board board;
IkokaStickNRFBoard board;
#ifdef DISPLAY_CLASS
DISPLAY_CLASS display;

View file

@ -3,7 +3,7 @@
#define RADIOLIB_STATIC_ONLY 1
#include <RadioLib.h>
#include <helpers/radiolib/RadioLibWrappers.h>
#include <ikoka_stick_nrf_board.h>
#include <IkokaStickNRFBoard.h>
#include <helpers/radiolib/CustomSX1262Wrapper.h>
#include <helpers/AutoDiscoverRTCClock.h>
#include <helpers/ArduinoHelpers.h>
@ -16,7 +16,7 @@
extern MomentaryButton user_btn;
#endif
extern ikoka_stick_nrf_board board;
extern IkokaStickNRFBoard board;
extern WRAPPER_CLASS radio_driver;
extern AutoDiscoverRTCClock rtc_clock;
extern EnvironmentSensorManager sensors;