Merge branch 'master' into ESPIDF-Rollup

This commit is contained in:
Ben Meadors 2022-09-12 14:56:09 -05:00 committed by GitHub
commit adc50f40b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 43 additions and 17 deletions

View File

@ -40,6 +40,7 @@ jobs:
- board: station-g1
- board: m5stack-core
- board: m5stack-coreink
- board: tbeam-s3-core
# - board: pico
runs-on: ubuntu-latest
@ -99,6 +100,7 @@ jobs:
- board: station-g1
- board: m5stack-core
- board: m5stack-coreink
- board: tbeam-s3-core
runs-on: ubuntu-latest
steps:
@ -358,7 +360,7 @@ jobs:
id: version
- name: Move files up
run: mv -b -t ./ ./*tbeam-*/littlefs*.bin ./*tbeam-*/system-info.bin ./**/firmware*.bin ./**/*.uf2 ./**/*.elf ./**/meshtasticd_linux_amd64 ./*native*/*device-*.sh ./*native*/*device-*.bat
run: mv -b -t ./ ./*tbeam-1*/littlefs*.bin ./*tbeam-1*/system-info.bin ./**/firmware*.bin ./**/*.uf2 ./**/*.elf ./**/meshtasticd_linux_amd64 ./*native*/*device-*.sh ./*native*/*device-*.bat
- name: Repackage in single firmware zip
uses: actions/upload-artifact@v2

@ -1 +1 @@
Subproject commit 5e255c01ed8883c9e68d3d4574b300ca609407c5
Subproject commit d67638c5eee8a7e52bd024a1739a3b00d6452b28

View File

@ -176,8 +176,8 @@ bool NMEAGPS::lookForLocation()
p.latitude_i = toDegInt(loc.lat);
p.longitude_i = toDegInt(loc.lng);
p.altitude_geoidal_seperation = reader.geoidHeight.meters();
p.altitude_hae = reader.altitude.meters() + p.altitude_geoidal_seperation;
p.altitude_geoidal_separation = reader.geoidHeight.meters();
p.altitude_hae = reader.altitude.meters() + p.altitude_geoidal_separation;
p.altitude = reader.altitude.meters();
p.fix_quality = fixQual;

View File

@ -183,6 +183,7 @@ void NodeDB::installDefaultConfig()
void NodeDB::initConfigIntervals()
{
config.position.gps_update_interval = default_gps_update_interval;
config.position.position_broadcast_secs = default_broadcast_interval_secs;
config.power.ls_secs = default_ls_secs;

View File

@ -175,6 +175,7 @@ extern NodeDB nodeDB;
#define IF_ROUTER(routerVal, normalVal) ((config.device.role == Config_DeviceConfig_Role_ROUTER) ? (routerVal) : (normalVal))
#define default_gps_update_interval IF_ROUTER(30, 15 * 60)
#define default_broadcast_interval_secs IF_ROUTER(12 * 60 * 60, 15 * 60)
#define default_wait_bluetooth_secs IF_ROUTER(1, 60)
#define default_mesh_sds_timeout_secs IF_ROUTER(NODE_DELAY_FOREVER, 2 * 60 * 60)

View File

@ -414,6 +414,8 @@ void RadioInterface::applyModemConfig()
if (power == 0)
power = 17; // Default to default power if we don't have a valid power
loraConfig.tx_power = power;
// Calculate the number of channels
uint32_t numChannels = floor((myRegion->freqEnd - myRegion->freqStart) / (myRegion->spacing + (bw / 1000)));

View File

@ -103,6 +103,8 @@ typedef struct _AdminMessage {
int32_t shutdown_seconds;
/* Tell the node to factory reset, all device settings will be returned to factory defaults. */
int32_t factory_reset;
/* Tell the node to reset the nodedb. */
int32_t nodedb_reset;
};
} AdminMessage;
@ -152,6 +154,7 @@ extern "C" {
#define AdminMessage_reboot_seconds_tag 97
#define AdminMessage_shutdown_seconds_tag 98
#define AdminMessage_factory_reset_tag 99
#define AdminMessage_nodedb_reset_tag 100
/* Struct field encoding specification for nanopb */
#define AdminMessage_FIELDLIST(X, a) \
@ -180,7 +183,8 @@ X(a, STATIC, ONEOF, BOOL, (payload_variant,confirm_set_radio,confirm_se
X(a, STATIC, ONEOF, BOOL, (payload_variant,exit_simulator,exit_simulator), 96) \
X(a, STATIC, ONEOF, INT32, (payload_variant,reboot_seconds,reboot_seconds), 97) \
X(a, STATIC, ONEOF, INT32, (payload_variant,shutdown_seconds,shutdown_seconds), 98) \
X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset,factory_reset), 99)
X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset,factory_reset), 99) \
X(a, STATIC, ONEOF, INT32, (payload_variant,nodedb_reset,nodedb_reset), 100)
#define AdminMessage_CALLBACK NULL
#define AdminMessage_DEFAULT NULL
#define AdminMessage_payload_variant_get_channel_response_MSGTYPE Channel

View File

@ -38,3 +38,4 @@ PB_BIND(Config_BluetoothConfig, Config_BluetoothConfig, AUTO)

View File

@ -21,7 +21,7 @@ typedef enum _Config_PositionConfig_PositionFlags {
Config_PositionConfig_PositionFlags_UNSET = 0,
Config_PositionConfig_PositionFlags_ALTITUDE = 1,
Config_PositionConfig_PositionFlags_ALTITUDE_MSL = 2,
Config_PositionConfig_PositionFlags_GEOIDAL_SEPERATION = 4,
Config_PositionConfig_PositionFlags_GEOIDAL_SEPARATION = 4,
Config_PositionConfig_PositionFlags_DOP = 8,
Config_PositionConfig_PositionFlags_HVDOP = 16,
Config_PositionConfig_PositionFlags_SATINVIEW = 32,
@ -46,6 +46,11 @@ typedef enum _Config_DisplayConfig_GpsCoordinateFormat {
Config_DisplayConfig_GpsCoordinateFormat_OSGR = 5
} Config_DisplayConfig_GpsCoordinateFormat;
typedef enum _Config_DisplayConfig_DisplayUnits {
Config_DisplayConfig_DisplayUnits_METRIC = 0,
Config_DisplayConfig_DisplayUnits_IMPERIAL = 1
} Config_DisplayConfig_DisplayUnits;
typedef enum _Config_LoRaConfig_RegionCode {
Config_LoRaConfig_RegionCode_UNSET = 0,
Config_LoRaConfig_RegionCode_US = 1,
@ -96,6 +101,8 @@ typedef struct _Config_DisplayConfig {
Config_DisplayConfig_GpsCoordinateFormat gps_format;
uint32_t auto_screen_carousel_secs;
bool compass_north_top;
bool flip_screen;
Config_DisplayConfig_DisplayUnits units;
} Config_DisplayConfig;
typedef struct _Config_LoRaConfig {
@ -173,6 +180,10 @@ typedef struct _Config {
#define _Config_DisplayConfig_GpsCoordinateFormat_MAX Config_DisplayConfig_GpsCoordinateFormat_OSGR
#define _Config_DisplayConfig_GpsCoordinateFormat_ARRAYSIZE ((Config_DisplayConfig_GpsCoordinateFormat)(Config_DisplayConfig_GpsCoordinateFormat_OSGR+1))
#define _Config_DisplayConfig_DisplayUnits_MIN Config_DisplayConfig_DisplayUnits_METRIC
#define _Config_DisplayConfig_DisplayUnits_MAX Config_DisplayConfig_DisplayUnits_IMPERIAL
#define _Config_DisplayConfig_DisplayUnits_ARRAYSIZE ((Config_DisplayConfig_DisplayUnits)(Config_DisplayConfig_DisplayUnits_IMPERIAL+1))
#define _Config_LoRaConfig_RegionCode_MIN Config_LoRaConfig_RegionCode_UNSET
#define _Config_LoRaConfig_RegionCode_MAX Config_LoRaConfig_RegionCode_TH
#define _Config_LoRaConfig_RegionCode_ARRAYSIZE ((Config_LoRaConfig_RegionCode)(Config_LoRaConfig_RegionCode_TH+1))
@ -196,7 +207,7 @@ extern "C" {
#define Config_PositionConfig_init_default {0, 0, 0, 0, 0, 0, 0}
#define Config_PowerConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0}
#define Config_NetworkConfig_init_default {0, _Config_NetworkConfig_WiFiMode_MIN, "", "", ""}
#define Config_DisplayConfig_init_default {0, _Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0}
#define Config_DisplayConfig_init_default {0, _Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _Config_DisplayConfig_DisplayUnits_MIN}
#define Config_LoRaConfig_init_default {0, _Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, {0, 0, 0}}
#define Config_BluetoothConfig_init_default {0, _Config_BluetoothConfig_PairingMode_MIN, 0}
#define Config_init_zero {0, {Config_DeviceConfig_init_zero}}
@ -204,7 +215,7 @@ extern "C" {
#define Config_PositionConfig_init_zero {0, 0, 0, 0, 0, 0, 0}
#define Config_PowerConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0}
#define Config_NetworkConfig_init_zero {0, _Config_NetworkConfig_WiFiMode_MIN, "", "", ""}
#define Config_DisplayConfig_init_zero {0, _Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0}
#define Config_DisplayConfig_init_zero {0, _Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _Config_DisplayConfig_DisplayUnits_MIN}
#define Config_LoRaConfig_init_zero {0, _Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, {0, 0, 0}}
#define Config_BluetoothConfig_init_zero {0, _Config_BluetoothConfig_PairingMode_MIN, 0}
@ -219,6 +230,8 @@ extern "C" {
#define Config_DisplayConfig_gps_format_tag 2
#define Config_DisplayConfig_auto_screen_carousel_secs_tag 3
#define Config_DisplayConfig_compass_north_top_tag 4
#define Config_DisplayConfig_flip_screen_tag 5
#define Config_DisplayConfig_units_tag 6
#define Config_LoRaConfig_use_preset_tag 1
#define Config_LoRaConfig_modem_preset_tag 2
#define Config_LoRaConfig_bandwidth_tag 3
@ -320,7 +333,9 @@ X(a, STATIC, SINGULAR, STRING, ntp_server, 5)
X(a, STATIC, SINGULAR, UINT32, screen_on_secs, 1) \
X(a, STATIC, SINGULAR, UENUM, gps_format, 2) \
X(a, STATIC, SINGULAR, UINT32, auto_screen_carousel_secs, 3) \
X(a, STATIC, SINGULAR, BOOL, compass_north_top, 4)
X(a, STATIC, SINGULAR, BOOL, compass_north_top, 4) \
X(a, STATIC, SINGULAR, BOOL, flip_screen, 5) \
X(a, STATIC, SINGULAR, UENUM, units, 6)
#define Config_DisplayConfig_CALLBACK NULL
#define Config_DisplayConfig_DEFAULT NULL
@ -368,7 +383,7 @@ extern const pb_msgdesc_t Config_BluetoothConfig_msg;
/* Maximum encoded size of messages (where known) */
#define Config_BluetoothConfig_size 10
#define Config_DeviceConfig_size 6
#define Config_DisplayConfig_size 16
#define Config_DisplayConfig_size 20
#define Config_LoRaConfig_size 69
#define Config_NetworkConfig_size 137
#define Config_PositionConfig_size 30

View File

@ -144,7 +144,7 @@ extern const pb_msgdesc_t LocalModuleConfig_msg;
#define LocalModuleConfig_fields &LocalModuleConfig_msg
/* Maximum encoded size of messages (where known) */
#define LocalConfig_size 332
#define LocalConfig_size 336
#define LocalModuleConfig_size 270
#ifdef __cplusplus

View File

@ -375,7 +375,7 @@ typedef struct _Position {
/* HAE altitude in meters - can be used instead of MSL altitude */
int32_t altitude_hae;
/* Geoidal separation in meters */
int32_t altitude_geoidal_seperation;
int32_t altitude_geoidal_separation;
/* Horizontal, Vertical and Position Dilution of Precision, in 1/100 units
- PDOP is sufficient for most cases
- for higher precision scenarios, HDOP and VDOP can be used instead,
@ -794,7 +794,7 @@ extern "C" {
#define Position_timestamp_tag 7
#define Position_timestamp_millis_adjust_tag 8
#define Position_altitude_hae_tag 9
#define Position_altitude_geoidal_seperation_tag 10
#define Position_altitude_geoidal_separation_tag 10
#define Position_PDOP_tag 11
#define Position_HDOP_tag 12
#define Position_VDOP_tag 13
@ -870,7 +870,7 @@ X(a, STATIC, SINGULAR, UENUM, altitude_source, 6) \
X(a, STATIC, SINGULAR, FIXED32, timestamp, 7) \
X(a, STATIC, SINGULAR, INT32, timestamp_millis_adjust, 8) \
X(a, STATIC, SINGULAR, SINT32, altitude_hae, 9) \
X(a, STATIC, SINGULAR, SINT32, altitude_geoidal_seperation, 10) \
X(a, STATIC, SINGULAR, SINT32, altitude_geoidal_separation, 10) \
X(a, STATIC, SINGULAR, UINT32, PDOP, 11) \
X(a, STATIC, SINGULAR, UINT32, HDOP, 12) \
X(a, STATIC, SINGULAR, UINT32, VDOP, 13) \

View File

@ -34,7 +34,7 @@ bool PositionModule::handleReceivedProtobuf(const MeshPacket &mp, Position *pptr
// Log packet size and list of fields
DEBUG_MSG("POSITION node=%08x l=%d %s%s%s%s%s%s%s%s%s%s%s%s%s\n", getFrom(&mp), mp.decoded.payload.size,
p.latitude_i ? "LAT " : "", p.longitude_i ? "LON " : "", p.altitude ? "MSL " : "", p.altitude_hae ? "HAE " : "",
p.altitude_geoidal_seperation ? "GEO " : "", p.PDOP ? "PDOP " : "", p.HDOP ? "HDOP " : "", p.VDOP ? "VDOP " : "",
p.altitude_geoidal_separation ? "GEO " : "", p.PDOP ? "PDOP " : "", p.HDOP ? "HDOP " : "", p.VDOP ? "VDOP " : "",
p.sats_in_view ? "SIV " : "", p.fix_quality ? "FXQ " : "", p.fix_type ? "FXT " : "", p.timestamp ? "PTS " : "",
p.time ? "TIME " : "");
@ -76,8 +76,8 @@ MeshPacket *PositionModule::allocReply()
else
p.altitude_hae = node->position.altitude_hae;
if (pos_flags & Config_PositionConfig_PositionFlags_GEOIDAL_SEPERATION)
p.altitude_geoidal_seperation = node->position.altitude_geoidal_seperation;
if (pos_flags & Config_PositionConfig_PositionFlags_GEOIDAL_SEPARATION)
p.altitude_geoidal_separation = node->position.altitude_geoidal_separation;
}
if (pos_flags & Config_PositionConfig_PositionFlags_DOP) {