mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-05 05:04:46 +00:00
Merge branch 'master' into tft-gui-work
This commit is contained in:
commit
7904f079a1
@ -1 +1 @@
|
|||||||
Subproject commit 9e61b8233181715363aba2aa6c91e85a2d61fc73
|
Subproject commit a45a6154d0721027bf63f85cfc5abd9f6fab2422
|
@ -222,9 +222,8 @@ bool perhapsSetRTC(RTCQuality q, struct tm &t)
|
|||||||
*/
|
*/
|
||||||
int32_t getTZOffset()
|
int32_t getTZOffset()
|
||||||
{
|
{
|
||||||
time_t now;
|
time_t now = getTime(false);
|
||||||
struct tm *gmt;
|
struct tm *gmt;
|
||||||
now = time(NULL);
|
|
||||||
gmt = gmtime(&now);
|
gmt = gmtime(&now);
|
||||||
gmt->tm_isdst = -1;
|
gmt->tm_isdst = -1;
|
||||||
return (int32_t)difftime(now, mktime(gmt));
|
return (int32_t)difftime(now, mktime(gmt));
|
||||||
|
@ -57,7 +57,9 @@ typedef enum _meshtastic_TelemetrySensorType {
|
|||||||
/* Lite On LTR-390UV-01 UV Light Sensor */
|
/* Lite On LTR-390UV-01 UV Light Sensor */
|
||||||
meshtastic_TelemetrySensorType_LTR390UV = 21,
|
meshtastic_TelemetrySensorType_LTR390UV = 21,
|
||||||
/* AMS TSL25911FN RGB Light Sensor */
|
/* AMS TSL25911FN RGB Light Sensor */
|
||||||
meshtastic_TelemetrySensorType_TSL25911FN = 22
|
meshtastic_TelemetrySensorType_TSL25911FN = 22,
|
||||||
|
/* AHT10 Integrated temperature and humidity sensor */
|
||||||
|
meshtastic_TelemetrySensorType_AHT10 = 23
|
||||||
} meshtastic_TelemetrySensorType;
|
} meshtastic_TelemetrySensorType;
|
||||||
|
|
||||||
/* Struct definitions */
|
/* Struct definitions */
|
||||||
@ -168,8 +170,8 @@ extern "C" {
|
|||||||
|
|
||||||
/* Helper constants for enums */
|
/* Helper constants for enums */
|
||||||
#define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET
|
#define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET
|
||||||
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_TSL25911FN
|
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_AHT10
|
||||||
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_TSL25911FN+1))
|
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_AHT10+1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -211,11 +211,11 @@ meshtastic_MeshPacket *PositionModule::allocReply()
|
|||||||
// Strip out any time information before sending packets to other nodes - to keep the wire size small (and because other
|
// Strip out any time information before sending packets to other nodes - to keep the wire size small (and because other
|
||||||
// nodes shouldn't trust it anyways) Note: we allow a device with a local GPS to include the time, so that gpsless
|
// nodes shouldn't trust it anyways) Note: we allow a device with a local GPS to include the time, so that gpsless
|
||||||
// devices can get time.
|
// devices can get time.
|
||||||
if (getRTCQuality() < RTCQualityDevice) {
|
if (getRTCQuality() < RTCQualityGPS) {
|
||||||
LOG_INFO("Stripping time %u from position send\n", p.time);
|
LOG_INFO("Stripping time %u from position send\n", p.time);
|
||||||
p.time = 0;
|
p.time = 0;
|
||||||
} else {
|
} else {
|
||||||
p.time = getValidTime(RTCQualityDevice);
|
p.time = getValidTime(RTCQualityGPS);
|
||||||
LOG_INFO("Providing time to mesh %u\n", p.time);
|
LOG_INFO("Providing time to mesh %u\n", p.time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user