- Fix millis() wraparound (49-day) in T1000SensorManager::loop() and
MicroNMEALocationProvider::loop() by switching from absolute comparison
(millis() > next_*) to elapsed-time arithmetic ((uint32_t)(millis() - last_*) >= interval)
with uint32_t timestamps; previous pattern could stall GPS updates and
time sync for up to ~24 days after wraparound
- Fix division-by-zero crash in get_heater_temperature() when ntc_volt == 0
(open circuit or bad ADC read); now returns 0.0f safely
- Fix out-of-bounds array access in get_heater_temperature(): loop exit at
i == 0 caused ntc_res2[i-1] / ntc_temp2[i-1] at index -1; loop exhaustion
at i == 136 caused ntc_res2[136] one-past-end read; clamped i to [1, 135]
with early-exit returns for edge temperatures and guarded interpolation
denominator against zero
The ntc_temp2 lookup table was declared as 'char', which can be
unsigned on some platforms, causing negative temperature values
(-30°C to -1°C) to be incorrectly interpreted.
Changed to int8_t to ensure proper signed integer handling of
negative temperatures.
Fixes#1389
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
As all NRF52 boards now have OTA support, let's remove the subclass
and integrate it into the base class.
Signed-off-by: Frieder Schrempf <frieder@fris.de>
The startOTAUpdate() is the same for all NRF52 boards. Use a common
implementation for all boards that currently have a specific
implementation.
The following boards currently have an empty startOTAUpdate() for
whatever reasons and therefore are not inheriting NRF52BoardOTA to
keep the same state: Nano G2 Ultra, Seeed SenseCAP T1000-E,
Wio WM1110.
Signed-off-by: Frieder Schrempf <frieder@fris.de>
Some NRF52 boards are able to use the internal power-efficient DC/DC
regulator. Add a new class that can be inherited by board classes to
enable this feature and reduce the power consumption.
Signed-off-by: Frieder Schrempf <frieder@fris.de>
Use a common begin() method that can be called from derived classes
to contain the shared initialization code.
Signed-off-by: Frieder Schrempf <frieder@fris.de>