mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-13 16:55:08 +00:00
Merge branch 'master' into dismiss_frames
This commit is contained in:
commit
4a88c24875
@ -184,8 +184,13 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
|
|||||||
type = RTC_RV3028;
|
type = RTC_RV3028;
|
||||||
logFoundDevice("RV3028", (uint8_t)addr.address);
|
logFoundDevice("RV3028", (uint8_t)addr.address);
|
||||||
rtc.initI2C(*i2cBus);
|
rtc.initI2C(*i2cBus);
|
||||||
rtc.writeToRegister(0x35, 0x07); // no Clkout
|
// Update RTC EEPROM settings, if necessary
|
||||||
rtc.writeToRegister(0x37, 0xB4);
|
if (rtc.readEEPROMRegister(0x35) != 0x07) {
|
||||||
|
rtc.writeEEPROMRegister(0x35, 0x07); // no Clkout
|
||||||
|
}
|
||||||
|
if (rtc.readEEPROMRegister(0x37) != 0xB4) {
|
||||||
|
rtc.writeEEPROMRegister(0x37, 0xB4);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1347,7 +1347,7 @@ int Screen::handleTextMessage(const meshtastic_MeshPacket *packet)
|
|||||||
if (shouldWakeOnReceivedMessage()) {
|
if (shouldWakeOnReceivedMessage()) {
|
||||||
setOn(true); // Wake up the screen first
|
setOn(true); // Wake up the screen first
|
||||||
forceDisplay(); // Forces screen redraw
|
forceDisplay(); // Forces screen redraw
|
||||||
|
}
|
||||||
// === Prepare banner content ===
|
// === Prepare banner content ===
|
||||||
const meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(packet->from);
|
const meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(packet->from);
|
||||||
const char *longName = (node && node->has_user) ? node->user.long_name : nullptr;
|
const char *longName = (node && node->has_user) ? node->user.long_name : nullptr;
|
||||||
@ -1382,7 +1382,6 @@ int Screen::handleTextMessage(const meshtastic_MeshPacket *packet)
|
|||||||
screen->showSimpleBanner(banner, 3000);
|
screen->showSimpleBanner(banner, 3000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -761,8 +761,17 @@ void setup()
|
|||||||
|
|
||||||
#if defined(USE_SH1107_128_64)
|
#if defined(USE_SH1107_128_64)
|
||||||
screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64
|
screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64
|
||||||
|
screen_geometry = GEOMETRY_128_64;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// if we have one of the fixed overrides in the settings, adjust display type accordingly.
|
||||||
|
if (screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107) {
|
||||||
|
screen_geometry = GEOMETRY_128_128;
|
||||||
|
} else if (screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107_128_64) {
|
||||||
|
screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107;
|
||||||
|
screen_geometry = GEOMETRY_128_64;
|
||||||
|
}
|
||||||
|
|
||||||
#if !MESHTASTIC_EXCLUDE_I2C
|
#if !MESHTASTIC_EXCLUDE_I2C
|
||||||
#if !defined(ARCH_STM32WL)
|
#if !defined(ARCH_STM32WL)
|
||||||
if (acc_info.type != ScanI2C::DeviceType::NONE) {
|
if (acc_info.type != ScanI2C::DeviceType::NONE) {
|
||||||
|
@ -65,8 +65,15 @@ class PositionModule : public ProtobufModule<meshtastic_Position>, private concu
|
|||||||
bool hasGPS();
|
bool hasGPS();
|
||||||
uint32_t lastSentReply = 0; // Last time we sent a position reply (used for reply throttling only)
|
uint32_t lastSentReply = 0; // Last time we sent a position reply (used for reply throttling only)
|
||||||
|
|
||||||
|
#if USERPREFS_EVENT_MODE
|
||||||
|
// In event mode we want to prevent excessive position broadcasts
|
||||||
|
// we set the minimum interval to 5m
|
||||||
|
const uint32_t minimumTimeThreshold =
|
||||||
|
max(300000, Default::getConfiguredOrDefaultMs(config.position.broadcast_smart_minimum_interval_secs, 30));
|
||||||
|
#else
|
||||||
const uint32_t minimumTimeThreshold =
|
const uint32_t minimumTimeThreshold =
|
||||||
Default::getConfiguredOrDefaultMs(config.position.broadcast_smart_minimum_interval_secs, 30);
|
Default::getConfiguredOrDefaultMs(config.position.broadcast_smart_minimum_interval_secs, 30);
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SmartPosition {
|
struct SmartPosition {
|
||||||
|
Loading…
Reference in New Issue
Block a user