mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-11 13:28:51 +00:00
Merge branch 'master' into issue5194-external-notification-module-refactor
This commit is contained in:
commit
b710ba248c
@ -1 +1 @@
|
|||||||
Subproject commit 52688fdccb8a40c23101cada3736b3b22c2b229e
|
Subproject commit af7521c3a77d56eb7a64efae5637a311ac33f76d
|
@ -788,7 +788,8 @@ void GPS::setPowerState(GPSPowerState newState, uint32_t sleepTime)
|
|||||||
void GPS::writePinEN(bool on)
|
void GPS::writePinEN(bool on)
|
||||||
{
|
{
|
||||||
// Abort: if conflict with Canned Messages when using Wisblock(?)
|
// Abort: if conflict with Canned Messages when using Wisblock(?)
|
||||||
if (HW_VENDOR == meshtastic_HardwareModel_RAK4631 && (rotaryEncoderInterruptImpl1 || upDownInterruptImpl1))
|
if ((HW_VENDOR == meshtastic_HardwareModel_RAK4631 || HW_VENDOR == meshtastic_HardwareModel_WISMESH_TAP) &&
|
||||||
|
(rotaryEncoderInterruptImpl1 || upDownInterruptImpl1))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Write and log
|
// Write and log
|
||||||
|
@ -101,9 +101,9 @@ std::vector<MeshModule *> moduleFrames;
|
|||||||
static char ourId[5];
|
static char ourId[5];
|
||||||
|
|
||||||
// vector where symbols (string) are displayed in bottom corner of display.
|
// vector where symbols (string) are displayed in bottom corner of display.
|
||||||
std::vector<std::string> functionSymbals;
|
std::vector<std::string> functionSymbol;
|
||||||
// string displayed in bottom right corner of display. Created from elements in functionSymbals vector
|
// string displayed in bottom right corner of display. Created from elements in functionSymbol vector
|
||||||
std::string functionSymbalString = "";
|
std::string functionSymbolString = "";
|
||||||
|
|
||||||
#if HAS_GPS
|
#if HAS_GPS
|
||||||
// GeoCoord object for the screen
|
// GeoCoord object for the screen
|
||||||
@ -243,10 +243,10 @@ static void drawWelcomeScreen(OLEDDisplay *display, OLEDDisplayUiState *state, i
|
|||||||
static void drawFunctionOverlay(OLEDDisplay *display, OLEDDisplayUiState *state)
|
static void drawFunctionOverlay(OLEDDisplay *display, OLEDDisplayUiState *state)
|
||||||
{
|
{
|
||||||
// LOG_DEBUG("Draw function overlay");
|
// LOG_DEBUG("Draw function overlay");
|
||||||
if (functionSymbals.begin() != functionSymbals.end()) {
|
if (functionSymbol.begin() != functionSymbol.end()) {
|
||||||
char buf[64];
|
char buf[64];
|
||||||
display->setFont(FONT_SMALL);
|
display->setFont(FONT_SMALL);
|
||||||
snprintf(buf, sizeof(buf), "%s", functionSymbalString.c_str());
|
snprintf(buf, sizeof(buf), "%s", functionSymbolString.c_str());
|
||||||
display->drawString(SCREEN_WIDTH - display->getStringWidth(buf), SCREEN_HEIGHT - FONT_HEIGHT_SMALL, buf);
|
display->drawString(SCREEN_WIDTH - display->getStringWidth(buf), SCREEN_HEIGHT - FONT_HEIGHT_SMALL, buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -958,55 +958,65 @@ static void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state
|
|||||||
|
|
||||||
display->setColor(WHITE);
|
display->setColor(WHITE);
|
||||||
#ifndef EXCLUDE_EMOJI
|
#ifndef EXCLUDE_EMOJI
|
||||||
if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F44D") == 0) {
|
const char *msg = reinterpret_cast<const char *>(mp.decoded.payload.bytes);
|
||||||
|
if (strcmp(msg, "\U0001F44D") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - thumbs_width) / 2,
|
display->drawXbm(x + (SCREEN_WIDTH - thumbs_width) / 2,
|
||||||
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5, thumbs_width, thumbs_height,
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5, thumbs_width, thumbs_height,
|
||||||
thumbup);
|
thumbup);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F44E") == 0) {
|
} else if (strcmp(msg, "\U0001F44E") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - thumbs_width) / 2,
|
display->drawXbm(x + (SCREEN_WIDTH - thumbs_width) / 2,
|
||||||
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5, thumbs_width, thumbs_height,
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5, thumbs_width, thumbs_height,
|
||||||
thumbdown);
|
thumbdown);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "❓") == 0) {
|
} else if (strcmp(msg, "\U0001F60A") == 0 || strcmp(msg, "\U0001F600") == 0 || strcmp(msg, "\U0001F642") == 0 ||
|
||||||
|
strcmp(msg, "\U0001F609") == 0 ||
|
||||||
|
strcmp(msg, "\U0001F601") == 0) { // matches 5 different common smileys, so that the phone user doesn't have to
|
||||||
|
// remember which one is compatible
|
||||||
|
display->drawXbm(x + (SCREEN_WIDTH - smiley_width) / 2,
|
||||||
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - smiley_height) / 2 + 2 + 5, smiley_width, smiley_height,
|
||||||
|
smiley);
|
||||||
|
} else if (strcmp(msg, "❓") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - question_width) / 2,
|
display->drawXbm(x + (SCREEN_WIDTH - question_width) / 2,
|
||||||
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - question_height) / 2 + 2 + 5, question_width, question_height,
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - question_height) / 2 + 2 + 5, question_width, question_height,
|
||||||
question);
|
question);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "‼️") == 0) {
|
} else if (strcmp(msg, "‼️") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - bang_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - bang_height) / 2 + 2 + 5,
|
display->drawXbm(x + (SCREEN_WIDTH - bang_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - bang_height) / 2 + 2 + 5,
|
||||||
bang_width, bang_height, bang);
|
bang_width, bang_height, bang);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F4A9") == 0) {
|
} else if (strcmp(msg, "\U0001F4A9") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - poo_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - poo_height) / 2 + 2 + 5,
|
display->drawXbm(x + (SCREEN_WIDTH - poo_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - poo_height) / 2 + 2 + 5,
|
||||||
poo_width, poo_height, poo);
|
poo_width, poo_height, poo);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\xf0\x9f\xa4\xa3") == 0) {
|
} else if (strcmp(msg, "\U0001F923") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - haha_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - haha_height) / 2 + 2 + 5,
|
display->drawXbm(x + (SCREEN_WIDTH - haha_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - haha_height) / 2 + 2 + 5,
|
||||||
haha_width, haha_height, haha);
|
haha_width, haha_height, haha);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F44B") == 0) {
|
} else if (strcmp(msg, "\U0001F44B") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - wave_icon_width) / 2,
|
display->drawXbm(x + (SCREEN_WIDTH - wave_icon_width) / 2,
|
||||||
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - wave_icon_height) / 2 + 2 + 5, wave_icon_width,
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - wave_icon_height) / 2 + 2 + 5, wave_icon_width,
|
||||||
wave_icon_height, wave_icon);
|
wave_icon_height, wave_icon);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F920") == 0) {
|
} else if (strcmp(msg, "\U0001F920") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - cowboy_width) / 2,
|
display->drawXbm(x + (SCREEN_WIDTH - cowboy_width) / 2,
|
||||||
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - cowboy_height) / 2 + 2 + 5, cowboy_width, cowboy_height,
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - cowboy_height) / 2 + 2 + 5, cowboy_width, cowboy_height,
|
||||||
cowboy);
|
cowboy);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F42D") == 0) {
|
} else if (strcmp(msg, "\U0001F42D") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - deadmau5_width) / 2,
|
display->drawXbm(x + (SCREEN_WIDTH - deadmau5_width) / 2,
|
||||||
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - deadmau5_height) / 2 + 2 + 5, deadmau5_width, deadmau5_height,
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - deadmau5_height) / 2 + 2 + 5, deadmau5_width, deadmau5_height,
|
||||||
deadmau5);
|
deadmau5);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\xE2\x98\x80\xEF\xB8\x8F") == 0) {
|
} else if (strcmp(msg, "\xE2\x98\x80\xEF\xB8\x8F") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - sun_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - sun_height) / 2 + 2 + 5,
|
display->drawXbm(x + (SCREEN_WIDTH - sun_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - sun_height) / 2 + 2 + 5,
|
||||||
sun_width, sun_height, sun);
|
sun_width, sun_height, sun);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\u2614") == 0) {
|
} else if (strcmp(msg, "\u2614") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - rain_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - rain_height) / 2 + 2 + 10,
|
display->drawXbm(x + (SCREEN_WIDTH - rain_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - rain_height) / 2 + 2 + 10,
|
||||||
rain_width, rain_height, rain);
|
rain_width, rain_height, rain);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "☁️") == 0) {
|
} else if (strcmp(msg, "☁️") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - cloud_width) / 2,
|
display->drawXbm(x + (SCREEN_WIDTH - cloud_width) / 2,
|
||||||
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - cloud_height) / 2 + 2 + 5, cloud_width, cloud_height, cloud);
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - cloud_height) / 2 + 2 + 5, cloud_width, cloud_height, cloud);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "🌫️") == 0) {
|
} else if (strcmp(msg, "🌫️") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - fog_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - fog_height) / 2 + 2 + 5,
|
display->drawXbm(x + (SCREEN_WIDTH - fog_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - fog_height) / 2 + 2 + 5,
|
||||||
fog_width, fog_height, fog);
|
fog_width, fog_height, fog);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\xf0\x9f\x98\x88") == 0) {
|
} else if (strcmp(msg, "\U0001F608") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - devil_width) / 2,
|
display->drawXbm(x + (SCREEN_WIDTH - devil_width) / 2,
|
||||||
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - devil_height) / 2 + 2 + 5, devil_width, devil_height, devil);
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - devil_height) / 2 + 2 + 5, devil_width, devil_height, devil);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "♥️") == 0) {
|
} else if (strcmp(msg, "♥️") == 0 || strcmp(msg, "\U0001F9E1") == 0 || strcmp(msg, "\U00002763") == 0 ||
|
||||||
|
strcmp(msg, "\U00002764") == 0 || strcmp(msg, "\U0001F495") == 0 || strcmp(msg, "\U0001F496") == 0 ||
|
||||||
|
strcmp(msg, "\U0001F497") == 0 || strcmp(msg, "\U0001F496") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - heart_width) / 2,
|
display->drawXbm(x + (SCREEN_WIDTH - heart_width) / 2,
|
||||||
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - heart_height) / 2 + 2 + 5, heart_width, heart_height, heart);
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - heart_height) / 2 + 2 + 5, heart_width, heart_height, heart);
|
||||||
} else {
|
} else {
|
||||||
@ -2242,24 +2252,24 @@ void Screen::decreaseBrightness()
|
|||||||
/* TO DO: add little popup in center of screen saying what brightness level it is set to*/
|
/* TO DO: add little popup in center of screen saying what brightness level it is set to*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void Screen::setFunctionSymbal(std::string sym)
|
void Screen::setFunctionSymbol(std::string sym)
|
||||||
{
|
{
|
||||||
if (std::find(functionSymbals.begin(), functionSymbals.end(), sym) == functionSymbals.end()) {
|
if (std::find(functionSymbol.begin(), functionSymbol.end(), sym) == functionSymbol.end()) {
|
||||||
functionSymbals.push_back(sym);
|
functionSymbol.push_back(sym);
|
||||||
functionSymbalString = "";
|
functionSymbolString = "";
|
||||||
for (auto symbol : functionSymbals) {
|
for (auto symbol : functionSymbol) {
|
||||||
functionSymbalString = symbol + " " + functionSymbalString;
|
functionSymbolString = symbol + " " + functionSymbolString;
|
||||||
}
|
}
|
||||||
setFastFramerate();
|
setFastFramerate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Screen::removeFunctionSymbal(std::string sym)
|
void Screen::removeFunctionSymbol(std::string sym)
|
||||||
{
|
{
|
||||||
functionSymbals.erase(std::remove(functionSymbals.begin(), functionSymbals.end(), sym), functionSymbals.end());
|
functionSymbol.erase(std::remove(functionSymbol.begin(), functionSymbol.end(), sym), functionSymbol.end());
|
||||||
functionSymbalString = "";
|
functionSymbolString = "";
|
||||||
for (auto symbol : functionSymbals) {
|
for (auto symbol : functionSymbol) {
|
||||||
functionSymbalString = symbol + " " + functionSymbalString;
|
functionSymbolString = symbol + " " + functionSymbolString;
|
||||||
}
|
}
|
||||||
setFastFramerate();
|
setFastFramerate();
|
||||||
}
|
}
|
||||||
@ -2747,4 +2757,4 @@ int Screen::handleAdminMessage(const meshtastic_AdminMessage *arg)
|
|||||||
} // namespace graphics
|
} // namespace graphics
|
||||||
#else
|
#else
|
||||||
graphics::Screen::Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY) {}
|
graphics::Screen::Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY) {}
|
||||||
#endif // HAS_SCREEN
|
#endif // HAS_SCREEN
|
||||||
|
@ -24,8 +24,8 @@ class Screen
|
|||||||
void startFirmwareUpdateScreen() {}
|
void startFirmwareUpdateScreen() {}
|
||||||
void increaseBrightness() {}
|
void increaseBrightness() {}
|
||||||
void decreaseBrightness() {}
|
void decreaseBrightness() {}
|
||||||
void setFunctionSymbal(std::string) {}
|
void setFunctionSymbol(std::string) {}
|
||||||
void removeFunctionSymbal(std::string) {}
|
void removeFunctionSymbol(std::string) {}
|
||||||
void startAlert(const char *) {}
|
void startAlert(const char *) {}
|
||||||
void endAlert() {}
|
void endAlert() {}
|
||||||
};
|
};
|
||||||
@ -282,8 +282,8 @@ class Screen : public concurrency::OSThread
|
|||||||
void increaseBrightness();
|
void increaseBrightness();
|
||||||
void decreaseBrightness();
|
void decreaseBrightness();
|
||||||
|
|
||||||
void setFunctionSymbal(std::string sym);
|
void setFunctionSymbol(std::string sym);
|
||||||
void removeFunctionSymbal(std::string sym);
|
void removeFunctionSymbol(std::string sym);
|
||||||
|
|
||||||
/// Stops showing the boot screen.
|
/// Stops showing the boot screen.
|
||||||
void stopBootScreen() { enqueueCmd(ScreenCmd{.cmd = Cmd::STOP_BOOT_SCREEN}); }
|
void stopBootScreen() { enqueueCmd(ScreenCmd{.cmd = Cmd::STOP_BOOT_SCREEN}); }
|
||||||
@ -605,4 +605,4 @@ class Screen : public concurrency::OSThread
|
|||||||
|
|
||||||
} // namespace graphics
|
} // namespace graphics
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -56,6 +56,16 @@ static unsigned char thumbdown[] PROGMEM = {
|
|||||||
0x80, 0x09, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,
|
0x80, 0x09, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define smiley_height 30
|
||||||
|
#define smiley_width 30
|
||||||
|
static unsigned char smiley[] PROGMEM = {
|
||||||
|
0x00, 0xfe, 0x0f, 0x00, 0x80, 0x01, 0x30, 0x00, 0x40, 0x00, 0xc0, 0x00, 0x20, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x02,
|
||||||
|
0x08, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x10, 0x02, 0x0e, 0x0e, 0x10, 0x02, 0x09, 0x12, 0x10,
|
||||||
|
0x01, 0x09, 0x12, 0x20, 0x01, 0x0f, 0x1e, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20,
|
||||||
|
0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x81, 0x00, 0x20, 0x20,
|
||||||
|
0x82, 0x00, 0x20, 0x10, 0x02, 0x01, 0x10, 0x10, 0x04, 0x02, 0x08, 0x08, 0x04, 0xfc, 0x07, 0x08, 0x08, 0x00, 0x00, 0x04,
|
||||||
|
0x10, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x01, 0x40, 0x00, 0xc0, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0xfe, 0x0f, 0x00};
|
||||||
|
|
||||||
#define question_height 25
|
#define question_height 25
|
||||||
#define question_width 25
|
#define question_width 25
|
||||||
static unsigned char question[] PROGMEM = {
|
static unsigned char question[] PROGMEM = {
|
||||||
|
@ -90,6 +90,8 @@ typedef struct _meshtastic_NodeInfoLite {
|
|||||||
/* True if node is in our ignored list
|
/* True if node is in our ignored list
|
||||||
Persists between NodeDB internal clean ups */
|
Persists between NodeDB internal clean ups */
|
||||||
bool is_ignored;
|
bool is_ignored;
|
||||||
|
/* Last byte of the node number of the node that should be used as the next hop to reach this node. */
|
||||||
|
uint8_t next_hop;
|
||||||
} meshtastic_NodeInfoLite;
|
} meshtastic_NodeInfoLite;
|
||||||
|
|
||||||
/* This message is never sent over the wire, but it is used for serializing DB
|
/* This message is never sent over the wire, but it is used for serializing DB
|
||||||
@ -153,12 +155,12 @@ extern "C" {
|
|||||||
/* Initializer values for message structs */
|
/* Initializer values for message structs */
|
||||||
#define meshtastic_PositionLite_init_default {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN}
|
#define meshtastic_PositionLite_init_default {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN}
|
||||||
#define meshtastic_UserLite_init_default {{0}, "", "", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
#define meshtastic_UserLite_init_default {{0}, "", "", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
||||||
#define meshtastic_NodeInfoLite_init_default {0, false, meshtastic_UserLite_init_default, false, meshtastic_PositionLite_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, false, 0, 0, 0}
|
#define meshtastic_NodeInfoLite_init_default {0, false, meshtastic_UserLite_init_default, false, meshtastic_PositionLite_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, false, 0, 0, 0, 0}
|
||||||
#define meshtastic_DeviceState_init_default {false, meshtastic_MyNodeInfo_init_default, false, meshtastic_User_init_default, 0, {meshtastic_MeshPacket_init_default}, false, meshtastic_MeshPacket_init_default, 0, 0, 0, false, meshtastic_MeshPacket_init_default, 0, {meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default}, {0}}
|
#define meshtastic_DeviceState_init_default {false, meshtastic_MyNodeInfo_init_default, false, meshtastic_User_init_default, 0, {meshtastic_MeshPacket_init_default}, false, meshtastic_MeshPacket_init_default, 0, 0, 0, false, meshtastic_MeshPacket_init_default, 0, {meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default}, {0}}
|
||||||
#define meshtastic_ChannelFile_init_default {0, {meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default}, 0}
|
#define meshtastic_ChannelFile_init_default {0, {meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default}, 0}
|
||||||
#define meshtastic_PositionLite_init_zero {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN}
|
#define meshtastic_PositionLite_init_zero {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN}
|
||||||
#define meshtastic_UserLite_init_zero {{0}, "", "", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
#define meshtastic_UserLite_init_zero {{0}, "", "", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
||||||
#define meshtastic_NodeInfoLite_init_zero {0, false, meshtastic_UserLite_init_zero, false, meshtastic_PositionLite_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, false, 0, 0, 0}
|
#define meshtastic_NodeInfoLite_init_zero {0, false, meshtastic_UserLite_init_zero, false, meshtastic_PositionLite_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, false, 0, 0, 0, 0}
|
||||||
#define meshtastic_DeviceState_init_zero {false, meshtastic_MyNodeInfo_init_zero, false, meshtastic_User_init_zero, 0, {meshtastic_MeshPacket_init_zero}, false, meshtastic_MeshPacket_init_zero, 0, 0, 0, false, meshtastic_MeshPacket_init_zero, 0, {meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero}, {0}}
|
#define meshtastic_DeviceState_init_zero {false, meshtastic_MyNodeInfo_init_zero, false, meshtastic_User_init_zero, 0, {meshtastic_MeshPacket_init_zero}, false, meshtastic_MeshPacket_init_zero, 0, 0, 0, false, meshtastic_MeshPacket_init_zero, 0, {meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero}, {0}}
|
||||||
#define meshtastic_ChannelFile_init_zero {0, {meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero}, 0}
|
#define meshtastic_ChannelFile_init_zero {0, {meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero}, 0}
|
||||||
|
|
||||||
@ -186,6 +188,7 @@ extern "C" {
|
|||||||
#define meshtastic_NodeInfoLite_hops_away_tag 9
|
#define meshtastic_NodeInfoLite_hops_away_tag 9
|
||||||
#define meshtastic_NodeInfoLite_is_favorite_tag 10
|
#define meshtastic_NodeInfoLite_is_favorite_tag 10
|
||||||
#define meshtastic_NodeInfoLite_is_ignored_tag 11
|
#define meshtastic_NodeInfoLite_is_ignored_tag 11
|
||||||
|
#define meshtastic_NodeInfoLite_next_hop_tag 12
|
||||||
#define meshtastic_DeviceState_my_node_tag 2
|
#define meshtastic_DeviceState_my_node_tag 2
|
||||||
#define meshtastic_DeviceState_owner_tag 3
|
#define meshtastic_DeviceState_owner_tag 3
|
||||||
#define meshtastic_DeviceState_receive_queue_tag 5
|
#define meshtastic_DeviceState_receive_queue_tag 5
|
||||||
@ -231,7 +234,8 @@ X(a, STATIC, SINGULAR, UINT32, channel, 7) \
|
|||||||
X(a, STATIC, SINGULAR, BOOL, via_mqtt, 8) \
|
X(a, STATIC, SINGULAR, BOOL, via_mqtt, 8) \
|
||||||
X(a, STATIC, OPTIONAL, UINT32, hops_away, 9) \
|
X(a, STATIC, OPTIONAL, UINT32, hops_away, 9) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, is_favorite, 10) \
|
X(a, STATIC, SINGULAR, BOOL, is_favorite, 10) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, is_ignored, 11)
|
X(a, STATIC, SINGULAR, BOOL, is_ignored, 11) \
|
||||||
|
X(a, STATIC, SINGULAR, UINT32, next_hop, 12)
|
||||||
#define meshtastic_NodeInfoLite_CALLBACK NULL
|
#define meshtastic_NodeInfoLite_CALLBACK NULL
|
||||||
#define meshtastic_NodeInfoLite_DEFAULT NULL
|
#define meshtastic_NodeInfoLite_DEFAULT NULL
|
||||||
#define meshtastic_NodeInfoLite_user_MSGTYPE meshtastic_UserLite
|
#define meshtastic_NodeInfoLite_user_MSGTYPE meshtastic_UserLite
|
||||||
@ -284,7 +288,7 @@ extern const pb_msgdesc_t meshtastic_ChannelFile_msg;
|
|||||||
/* meshtastic_DeviceState_size depends on runtime parameters */
|
/* meshtastic_DeviceState_size depends on runtime parameters */
|
||||||
#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_ChannelFile_size
|
#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_ChannelFile_size
|
||||||
#define meshtastic_ChannelFile_size 718
|
#define meshtastic_ChannelFile_size 718
|
||||||
#define meshtastic_NodeInfoLite_size 185
|
#define meshtastic_NodeInfoLite_size 188
|
||||||
#define meshtastic_PositionLite_size 28
|
#define meshtastic_PositionLite_size 28
|
||||||
#define meshtastic_UserLite_size 96
|
#define meshtastic_UserLite_size 96
|
||||||
|
|
||||||
|
@ -212,6 +212,9 @@ typedef enum _meshtastic_HardwareModel {
|
|||||||
meshtastic_HardwareModel_MS24SF1 = 82,
|
meshtastic_HardwareModel_MS24SF1 = 82,
|
||||||
/* Lilygo TLora-C6 with the new ESP32-C6 MCU */
|
/* Lilygo TLora-C6 with the new ESP32-C6 MCU */
|
||||||
meshtastic_HardwareModel_TLORA_C6 = 83,
|
meshtastic_HardwareModel_TLORA_C6 = 83,
|
||||||
|
/* WisMesh Tap
|
||||||
|
RAK-4631 w/ TFT in injection modled case */
|
||||||
|
meshtastic_HardwareModel_WISMESH_TAP = 84,
|
||||||
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------ */
|
------------------------------------------------------------------------------------------------------------------------------------------ */
|
||||||
@ -751,6 +754,12 @@ typedef struct _meshtastic_MeshPacket {
|
|||||||
meshtastic_MeshPacket_public_key_t public_key;
|
meshtastic_MeshPacket_public_key_t public_key;
|
||||||
/* Indicates whether the packet was en/decrypted using PKI */
|
/* Indicates whether the packet was en/decrypted using PKI */
|
||||||
bool pki_encrypted;
|
bool pki_encrypted;
|
||||||
|
/* Last byte of the node number of the node that should be used as the next hop in routing.
|
||||||
|
Set by the firmware internally, clients are not supposed to set this. */
|
||||||
|
uint8_t next_hop;
|
||||||
|
/* Last byte of the node number of the node that will relay/relayed this packet.
|
||||||
|
Set by the firmware internally, clients are not supposed to set this. */
|
||||||
|
uint8_t relay_node;
|
||||||
} meshtastic_MeshPacket;
|
} meshtastic_MeshPacket;
|
||||||
|
|
||||||
/* The bluetooth to device link:
|
/* The bluetooth to device link:
|
||||||
@ -1159,7 +1168,7 @@ extern "C" {
|
|||||||
#define meshtastic_Data_init_default {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0}
|
#define meshtastic_Data_init_default {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0}
|
||||||
#define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0}
|
#define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0}
|
||||||
#define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0}
|
#define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0}
|
||||||
#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0}
|
#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0}
|
||||||
#define meshtastic_NodeInfo_init_default {0, false, meshtastic_User_init_default, false, meshtastic_Position_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, false, 0, 0, 0}
|
#define meshtastic_NodeInfo_init_default {0, false, meshtastic_User_init_default, false, meshtastic_Position_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, false, 0, 0, 0}
|
||||||
#define meshtastic_MyNodeInfo_init_default {0, 0, 0, {0, {0}}, ""}
|
#define meshtastic_MyNodeInfo_init_default {0, 0, 0, {0, {0}}, ""}
|
||||||
#define meshtastic_LogRecord_init_default {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
#define meshtastic_LogRecord_init_default {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
||||||
@ -1184,7 +1193,7 @@ extern "C" {
|
|||||||
#define meshtastic_Data_init_zero {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0}
|
#define meshtastic_Data_init_zero {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0}
|
||||||
#define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0}
|
#define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0}
|
||||||
#define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0}
|
#define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0}
|
||||||
#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0}
|
#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0}
|
||||||
#define meshtastic_NodeInfo_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_Position_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, false, 0, 0, 0}
|
#define meshtastic_NodeInfo_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_Position_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, false, 0, 0, 0}
|
||||||
#define meshtastic_MyNodeInfo_init_zero {0, 0, 0, {0, {0}}, ""}
|
#define meshtastic_MyNodeInfo_init_zero {0, 0, 0, {0, {0}}, ""}
|
||||||
#define meshtastic_LogRecord_init_zero {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
#define meshtastic_LogRecord_init_zero {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
||||||
@ -1280,6 +1289,8 @@ extern "C" {
|
|||||||
#define meshtastic_MeshPacket_hop_start_tag 15
|
#define meshtastic_MeshPacket_hop_start_tag 15
|
||||||
#define meshtastic_MeshPacket_public_key_tag 16
|
#define meshtastic_MeshPacket_public_key_tag 16
|
||||||
#define meshtastic_MeshPacket_pki_encrypted_tag 17
|
#define meshtastic_MeshPacket_pki_encrypted_tag 17
|
||||||
|
#define meshtastic_MeshPacket_next_hop_tag 18
|
||||||
|
#define meshtastic_MeshPacket_relay_node_tag 19
|
||||||
#define meshtastic_NodeInfo_num_tag 1
|
#define meshtastic_NodeInfo_num_tag 1
|
||||||
#define meshtastic_NodeInfo_user_tag 2
|
#define meshtastic_NodeInfo_user_tag 2
|
||||||
#define meshtastic_NodeInfo_position_tag 3
|
#define meshtastic_NodeInfo_position_tag 3
|
||||||
@ -1474,7 +1485,9 @@ X(a, STATIC, SINGULAR, UENUM, delayed, 13) \
|
|||||||
X(a, STATIC, SINGULAR, BOOL, via_mqtt, 14) \
|
X(a, STATIC, SINGULAR, BOOL, via_mqtt, 14) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, hop_start, 15) \
|
X(a, STATIC, SINGULAR, UINT32, hop_start, 15) \
|
||||||
X(a, STATIC, SINGULAR, BYTES, public_key, 16) \
|
X(a, STATIC, SINGULAR, BYTES, public_key, 16) \
|
||||||
X(a, STATIC, SINGULAR, BOOL, pki_encrypted, 17)
|
X(a, STATIC, SINGULAR, BOOL, pki_encrypted, 17) \
|
||||||
|
X(a, STATIC, SINGULAR, UINT32, next_hop, 18) \
|
||||||
|
X(a, STATIC, SINGULAR, UINT32, relay_node, 19)
|
||||||
#define meshtastic_MeshPacket_CALLBACK NULL
|
#define meshtastic_MeshPacket_CALLBACK NULL
|
||||||
#define meshtastic_MeshPacket_DEFAULT NULL
|
#define meshtastic_MeshPacket_DEFAULT NULL
|
||||||
#define meshtastic_MeshPacket_payload_variant_decoded_MSGTYPE meshtastic_Data
|
#define meshtastic_MeshPacket_payload_variant_decoded_MSGTYPE meshtastic_Data
|
||||||
@ -1724,7 +1737,7 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
|
|||||||
#define meshtastic_FromRadio_size 510
|
#define meshtastic_FromRadio_size 510
|
||||||
#define meshtastic_Heartbeat_size 0
|
#define meshtastic_Heartbeat_size 0
|
||||||
#define meshtastic_LogRecord_size 426
|
#define meshtastic_LogRecord_size 426
|
||||||
#define meshtastic_MeshPacket_size 367
|
#define meshtastic_MeshPacket_size 375
|
||||||
#define meshtastic_MqttClientProxyMessage_size 501
|
#define meshtastic_MqttClientProxyMessage_size 501
|
||||||
#define meshtastic_MyNodeInfo_size 77
|
#define meshtastic_MyNodeInfo_size 77
|
||||||
#define meshtastic_NeighborInfo_size 258
|
#define meshtastic_NeighborInfo_size 258
|
||||||
|
@ -74,6 +74,7 @@ void registerHandlers(HTTPServer *insecureServer, HTTPSServer *secureServer)
|
|||||||
|
|
||||||
ResourceNode *nodeAPIv1ToRadioOptions = new ResourceNode("/api/v1/toradio", "OPTIONS", &handleAPIv1ToRadio);
|
ResourceNode *nodeAPIv1ToRadioOptions = new ResourceNode("/api/v1/toradio", "OPTIONS", &handleAPIv1ToRadio);
|
||||||
ResourceNode *nodeAPIv1ToRadio = new ResourceNode("/api/v1/toradio", "PUT", &handleAPIv1ToRadio);
|
ResourceNode *nodeAPIv1ToRadio = new ResourceNode("/api/v1/toradio", "PUT", &handleAPIv1ToRadio);
|
||||||
|
ResourceNode *nodeAPIv1FromRadioOptions = new ResourceNode("/api/v1/fromradio", "OPTIONS", &handleAPIv1FromRadio);
|
||||||
ResourceNode *nodeAPIv1FromRadio = new ResourceNode("/api/v1/fromradio", "GET", &handleAPIv1FromRadio);
|
ResourceNode *nodeAPIv1FromRadio = new ResourceNode("/api/v1/fromradio", "GET", &handleAPIv1FromRadio);
|
||||||
|
|
||||||
// ResourceNode *nodeHotspotApple = new ResourceNode("/hotspot-detect.html", "GET", &handleHotspot);
|
// ResourceNode *nodeHotspotApple = new ResourceNode("/hotspot-detect.html", "GET", &handleHotspot);
|
||||||
@ -100,6 +101,7 @@ void registerHandlers(HTTPServer *insecureServer, HTTPSServer *secureServer)
|
|||||||
// Secure nodes
|
// Secure nodes
|
||||||
secureServer->registerNode(nodeAPIv1ToRadioOptions);
|
secureServer->registerNode(nodeAPIv1ToRadioOptions);
|
||||||
secureServer->registerNode(nodeAPIv1ToRadio);
|
secureServer->registerNode(nodeAPIv1ToRadio);
|
||||||
|
secureServer->registerNode(nodeAPIv1FromRadioOptions);
|
||||||
secureServer->registerNode(nodeAPIv1FromRadio);
|
secureServer->registerNode(nodeAPIv1FromRadio);
|
||||||
// secureServer->registerNode(nodeHotspotApple);
|
// secureServer->registerNode(nodeHotspotApple);
|
||||||
// secureServer->registerNode(nodeHotspotAndroid);
|
// secureServer->registerNode(nodeHotspotAndroid);
|
||||||
@ -121,6 +123,7 @@ void registerHandlers(HTTPServer *insecureServer, HTTPSServer *secureServer)
|
|||||||
// Insecure nodes
|
// Insecure nodes
|
||||||
insecureServer->registerNode(nodeAPIv1ToRadioOptions);
|
insecureServer->registerNode(nodeAPIv1ToRadioOptions);
|
||||||
insecureServer->registerNode(nodeAPIv1ToRadio);
|
insecureServer->registerNode(nodeAPIv1ToRadio);
|
||||||
|
insecureServer->registerNode(nodeAPIv1FromRadioOptions);
|
||||||
insecureServer->registerNode(nodeAPIv1FromRadio);
|
insecureServer->registerNode(nodeAPIv1FromRadio);
|
||||||
// insecureServer->registerNode(nodeHotspotApple);
|
// insecureServer->registerNode(nodeHotspotApple);
|
||||||
// insecureServer->registerNode(nodeHotspotAndroid);
|
// insecureServer->registerNode(nodeHotspotAndroid);
|
||||||
@ -163,6 +166,12 @@ void handleAPIv1FromRadio(HTTPRequest *req, HTTPResponse *res)
|
|||||||
res->setHeader("Access-Control-Allow-Methods", "GET");
|
res->setHeader("Access-Control-Allow-Methods", "GET");
|
||||||
res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto");
|
res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto");
|
||||||
|
|
||||||
|
if (req->getMethod() == "OPTIONS") {
|
||||||
|
res->setStatusCode(204); // Success with no content
|
||||||
|
// res->print(""); @todo remove
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
uint8_t txBuf[MAX_STREAM_BUF_SIZE];
|
uint8_t txBuf[MAX_STREAM_BUF_SIZE];
|
||||||
uint32_t len = 1;
|
uint32_t len = 1;
|
||||||
|
|
||||||
|
@ -234,13 +234,13 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
|||||||
screen->decreaseBrightness();
|
screen->decreaseBrightness();
|
||||||
LOG_DEBUG("Decrease Screen Brightness");
|
LOG_DEBUG("Decrease Screen Brightness");
|
||||||
break;
|
break;
|
||||||
case INPUT_BROKER_MSG_FN_SYMBOL_ON: // draw modifier (function) symbal
|
case INPUT_BROKER_MSG_FN_SYMBOL_ON: // draw modifier (function) symbol
|
||||||
if (screen)
|
if (screen)
|
||||||
screen->setFunctionSymbal("Fn");
|
screen->setFunctionSymbol("Fn");
|
||||||
break;
|
break;
|
||||||
case INPUT_BROKER_MSG_FN_SYMBOL_OFF: // remove modifier (function) symbal
|
case INPUT_BROKER_MSG_FN_SYMBOL_OFF: // remove modifier (function) symbol
|
||||||
if (screen)
|
if (screen)
|
||||||
screen->removeFunctionSymbal("Fn");
|
screen->removeFunctionSymbol("Fn");
|
||||||
break;
|
break;
|
||||||
// mute (switch off/toggle) external notifications on fn+m
|
// mute (switch off/toggle) external notifications on fn+m
|
||||||
case INPUT_BROKER_MSG_MUTE_TOGGLE:
|
case INPUT_BROKER_MSG_MUTE_TOGGLE:
|
||||||
@ -249,13 +249,13 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
|||||||
externalNotificationModule->setMute(false);
|
externalNotificationModule->setMute(false);
|
||||||
showTemporaryMessage("Notifications \nEnabled");
|
showTemporaryMessage("Notifications \nEnabled");
|
||||||
if (screen)
|
if (screen)
|
||||||
screen->removeFunctionSymbal("M"); // remove the mute symbol from the bottom right corner
|
screen->removeFunctionSymbol("M"); // remove the mute symbol from the bottom right corner
|
||||||
} else {
|
} else {
|
||||||
externalNotificationModule->stopNow(); // this will turn off all GPIO and sounds and idle the loop
|
externalNotificationModule->stopNow(); // this will turn off all GPIO and sounds and idle the loop
|
||||||
externalNotificationModule->setMute(true);
|
externalNotificationModule->setMute(true);
|
||||||
showTemporaryMessage("Notifications \nDisabled");
|
showTemporaryMessage("Notifications \nDisabled");
|
||||||
if (screen)
|
if (screen)
|
||||||
screen->setFunctionSymbal("M"); // add the mute symbol to the bottom right corner
|
screen->setFunctionSymbol("M"); // add the mute symbol to the bottom right corner
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -308,7 +308,7 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (screen && (event->kbchar != INPUT_BROKER_MSG_FN_SYMBOL_ON)) {
|
if (screen && (event->kbchar != INPUT_BROKER_MSG_FN_SYMBOL_ON)) {
|
||||||
screen->removeFunctionSymbal("Fn"); // remove modifier (function) symbal
|
screen->removeFunctionSymbol("Fn"); // remove modifier (function) symbol
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -672,7 +672,7 @@ int32_t CannedMessageModule::runOnce()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (screen)
|
if (screen)
|
||||||
screen->removeFunctionSymbal("Fn");
|
screen->removeFunctionSymbol("Fn");
|
||||||
}
|
}
|
||||||
|
|
||||||
this->lastTouchMillis = millis();
|
this->lastTouchMillis = millis();
|
||||||
|
@ -47,6 +47,8 @@
|
|||||||
#define HW_VENDOR meshtastic_HardwareModel_PPR
|
#define HW_VENDOR meshtastic_HardwareModel_PPR
|
||||||
#elif defined(RAK2560)
|
#elif defined(RAK2560)
|
||||||
#define HW_VENDOR meshtastic_HardwareModel_RAK2560
|
#define HW_VENDOR meshtastic_HardwareModel_RAK2560
|
||||||
|
#elif defined(WISMESH_TAP)
|
||||||
|
#define HW_VENDOR meshtastic_HardwareModel_WISMESH_TAP
|
||||||
#elif defined(RAK4630)
|
#elif defined(RAK4630)
|
||||||
#define HW_VENDOR meshtastic_HardwareModel_RAK4631
|
#define HW_VENDOR meshtastic_HardwareModel_RAK4631
|
||||||
#elif defined(TTGO_T_ECHO)
|
#elif defined(TTGO_T_ECHO)
|
||||||
|
@ -2,14 +2,13 @@
|
|||||||
[env:rak_wismeshtap]
|
[env:rak_wismeshtap]
|
||||||
extends = nrf52840_base
|
extends = nrf52840_base
|
||||||
board = wiscore_rak4631
|
board = wiscore_rak4631
|
||||||
build_flags = ${nrf52840_base.build_flags} -Ivariants/rak_wismeshtap -D RAK_4631
|
build_flags = ${nrf52840_base.build_flags} -Ivariants/rak_wismeshtap -DWISMESH_TAP -DRAK_4631
|
||||||
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
|
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
|
||||||
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||||
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
|
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
|
||||||
-DEINK_WIDTH=250
|
-DEINK_WIDTH=250
|
||||||
-DEINK_HEIGHT=122
|
-DEINK_HEIGHT=122
|
||||||
-DMESHTASTIC_EXCLUDE_WIFI=1
|
-DMESHTASTIC_EXCLUDE_WIFI=1
|
||||||
-DMESHTASTIC_EXCLUDE_WAYPOINT=1
|
|
||||||
-DMESHTASTIC_EXCLUDE_DETECTIONSENSOR=1
|
-DMESHTASTIC_EXCLUDE_DETECTIONSENSOR=1
|
||||||
-DMESHTASTIC_EXCLUDE_STOREFORWARD=1
|
-DMESHTASTIC_EXCLUDE_STOREFORWARD=1
|
||||||
-DMESHTASTIC_EXCLUDE_POWER_TELEMETRY=1
|
-DMESHTASTIC_EXCLUDE_POWER_TELEMETRY=1
|
||||||
|
@ -271,13 +271,8 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
|||||||
|
|
||||||
#define HAS_RTC 1
|
#define HAS_RTC 1
|
||||||
|
|
||||||
#define HAS_ETHERNET 1
|
|
||||||
|
|
||||||
#define RAK_4631 1
|
#define RAK_4631 1
|
||||||
|
|
||||||
#define PIN_ETHERNET_RESET 21
|
|
||||||
#define PIN_ETHERNET_SS PIN_EINK_CS
|
|
||||||
#define ETH_SPI_PORT SPI1
|
|
||||||
#define AQ_SET_PIN 10
|
#define AQ_SET_PIN 10
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
Reference in New Issue
Block a user