mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 09:45:37 +03:00
M10 ValSet support, unit connection and reconnect stability (#12799)
* WIP * start of implement m10 code * Fetch MON-VER from unit to check for unit version * test nav5 m10 command * missing empty lines * offload detect to config file * copy from hasli and organization * fix platform.h include * fix cli_unittest gps include * fix cli_unittest for gps calls * guard ublox version in gpsData * print human readable hw version * add utc_standard param and transfer with nav5 set add nav5x message for autonomous mode for m10 * fix typo * revert order structure, remove functions and reduce flash size * revert order structure, remove functions and reduce flash size * fix gps init and navx5 message * generalized nav5 message * remove unguarded debug * change ubx version detection, baud rate negotiation fix and save found baud * revert indentation * revert indentation and refactorings * the new code works with faster baud rate changes * remove unguarded debug statement * fix cli commands, major space reduce finished, removed extensions for now * ubx version checks, add valset for M10 * beta of valset, change suggestions from ledvinap and macgivergim * valset helper function and combine set nav rate valsets * more valset refactoring * remove big array and replace with macro * remove assert, as it can stop bf completely * refactoring to offsetof * making reconnect more resilient, reorganize rate setup, so it doesnt get missed on init * improved lost communcation detection, dont rely on ACK/NACK anymore * paket rate debug * adding debug mode, fixing major flight mode bug * revert fake flight "isConfiguratorConnected" * fixed proto detection, fixed reconfigure on too low updaterate * valset doesnt always send ACK, so we dont wait for it * size optimization, debug mode rename, minor fixes * implemented some requested changes * changed wait delay millisecond based * fixes from ctzsnooze and zzXyz * timer fixes * CamelCase new settings names * indent * Fix failure to enter flight model on GPS Fix * remove old commented out debugs * simplify timeouts * Clarify skip_acc and remove development valset code * accept PL's advice to remove >> (8 * 0 * Simplify package counter, remove reconfiguration based on packet count * fix error in package count introduced in previous commit * Fix delay detecting Configurator, ANA disable (for another PR) * address payload comments and fix logical error * indentation edits * delete old enum * log gps and firmware nav interval times * fix payload size, inc Rx buffer to 256, ifDef for sw_proto * remove token parsing (Petr suggestions) * fixes from reviews * Basic NMEA improvements * Address comments from karate * only check platform version - thanks zzyzx * Fix for too many sats problem - thanks zzyzx * tidy up comments, ifdef some ublox definitions * Use Nav packet intervals, NMEA and UBX, for time delta * Resolve comments and flatten conditionals * editorial change * single function for gpsSol.navIntervalMs * adam-ah suggestion for payload optimisation * ACK/NAK & polled message timer fixes * Revert timer fixes - unexpected side effects * Revert adam-ah suggestion for payload optimisation" This reverts commit 42fc8c04fdbc436c9ef196b88f0764ffcbb9239f. Broke the display of sat info when more than 32 sats in view * implement a number of comments * Fast task rate on new data, don't spam at the start thanks adam-ah * include PDOP for M10 via NAV-PVT * Address some of PL's recent comments * don't recalculate millis so many times * tidy up baudrate connect code * Split receiving of GPS bytes from processing by adding GPS_STATE_PROCESS_DATA * Split receiving of GPS bytes from processing by adding GPS_STATE_PROCESS_DATA * Preserve state whilst processing packets * Set gpsData.state directly as gpsSetState() clobbers gpsData.state_position * Restore original read time check * Schedule gpsUpdate() to run immediately again when a packet is received for processing * add debugs to display scheduler valuesl * simpler scheduler solution * minor debug change * FIxes: M10 connection, pDop, NMEA disable; thanks zzyxz NB: Breaks unit's neat reconnection methods M8 need a lot of settling time before using the serial port * ubx parse length sanity + cleanup + dashboard conditional compiles * Address recent comments from PL --------- Co-authored-by: ctzsnooze <chris.thompson@sydney.edu.au> Co-authored-by: ZzyzxTek <zzyzx@zzyzxtek.com> Co-authored-by: Steve Evans <Steve@SCEvans.com>
This commit is contained in:
parent
807a7229c9
commit
083b595617
17 changed files with 1650 additions and 803 deletions
|
@ -198,17 +198,21 @@ static const char * const lookupTableGyro[] = {
|
|||
#endif
|
||||
|
||||
#ifdef USE_GPS
|
||||
static const char * const lookupTableGPSProvider[] = {
|
||||
static const char * const lookupTableGpsProvider[] = {
|
||||
"NMEA", "UBLOX", "MSP"
|
||||
};
|
||||
|
||||
static const char * const lookupTableGPSSBASMode[] = {
|
||||
static const char * const lookupTableGpsSbasMode[] = {
|
||||
"AUTO", "EGNOS", "WAAS", "MSAS", "GAGAN", "NONE"
|
||||
};
|
||||
|
||||
static const char * const lookupTableGPSUBLOXModels[] = {
|
||||
static const char * const lookupTableGpsUbloxModels[] = {
|
||||
"PORTABLE", "STATIONARY", "PEDESTRIAN", "AUTOMOTIVE", "AT_SEA", "AIRBORNE_1G", "AIRBORNE_2G", "AIRBORNE_4G"
|
||||
};
|
||||
|
||||
static const char * const lookupTableGpsUbloxUtcStandard[] = {
|
||||
"AUTO", "USNO", "EU", "SU", "NTSC"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef USE_SERVOS
|
||||
|
@ -533,9 +537,10 @@ const lookupTableEntry_t lookupTables[] = {
|
|||
LOOKUP_TABLE_ENTRY(lookupTableUnit),
|
||||
LOOKUP_TABLE_ENTRY(lookupTableAlignment),
|
||||
#ifdef USE_GPS
|
||||
LOOKUP_TABLE_ENTRY(lookupTableGPSProvider),
|
||||
LOOKUP_TABLE_ENTRY(lookupTableGPSSBASMode),
|
||||
LOOKUP_TABLE_ENTRY(lookupTableGPSUBLOXModels),
|
||||
LOOKUP_TABLE_ENTRY(lookupTableGpsProvider),
|
||||
LOOKUP_TABLE_ENTRY(lookupTableGpsSbasMode),
|
||||
LOOKUP_TABLE_ENTRY(lookupTableGpsUbloxModels),
|
||||
LOOKUP_TABLE_ENTRY(lookupTableGpsUbloxUtcStandard),
|
||||
#ifdef USE_GPS_RESCUE
|
||||
LOOKUP_TABLE_ENTRY(lookupTableRescueSanityType),
|
||||
LOOKUP_TABLE_ENTRY(lookupTableRescueAltitudeMode),
|
||||
|
@ -1017,9 +1022,9 @@ const clivalue_t valueTable[] = {
|
|||
{ PARAM_NAME_GPS_AUTO_BAUD, VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_GPS_CONFIG, offsetof(gpsConfig_t, autoBaud) },
|
||||
{ PARAM_NAME_GPS_UBLOX_ACQUIRE_MODEL, VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_GPS_UBLOX_MODELS }, PG_GPS_CONFIG, offsetof(gpsConfig_t, gps_ublox_acquire_model) },
|
||||
{ PARAM_NAME_GPS_UBLOX_FLIGHT_MODEL, VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_GPS_UBLOX_MODELS }, PG_GPS_CONFIG, offsetof(gpsConfig_t, gps_ublox_flight_model) },
|
||||
{ PARAM_NAME_GPS_UPDATE_RATE_HZ, VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = {1, 19}, PG_GPS_CONFIG, offsetof(gpsConfig_t, gps_update_rate_hz) },
|
||||
{ PARAM_NAME_GPS_UPDATE_RATE_HZ, VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = {1, 20}, PG_GPS_CONFIG, offsetof(gpsConfig_t, gps_update_rate_hz) },
|
||||
{ PARAM_NAME_GPS_UBLOX_UTC_STANDARD, VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_GPS_UBLOX_UTC_STANDARD }, PG_GPS_CONFIG, offsetof(gpsConfig_t, gps_ublox_utc_standard) },
|
||||
{ PARAM_NAME_GPS_UBLOX_USE_GALILEO, VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_GPS_CONFIG, offsetof(gpsConfig_t, gps_ublox_use_galileo) },
|
||||
{ PARAM_NAME_GPS_UBLOX_FULL_POWER, VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_GPS_CONFIG, offsetof(gpsConfig_t, gps_ublox_full_power) },
|
||||
{ PARAM_NAME_GPS_SET_HOME_POINT_ONCE, VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_GPS_CONFIG, offsetof(gpsConfig_t, gps_set_home_point_once) },
|
||||
{ PARAM_NAME_GPS_USE_3D_SPEED, VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_GPS_CONFIG, offsetof(gpsConfig_t, gps_use_3d_speed) },
|
||||
{ PARAM_NAME_GPS_SBAS_INTEGRITY, VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_GPS_CONFIG, offsetof(gpsConfig_t, sbas_integrity) },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue