GPS Device
Loading...
Searching...
No Matches
NEO-6 Command Handlers

Functions

static ERR_te neo6_dumpnmea_handler (uint32_t argc, char **argv)
 CLI handler for the "dumpnmea" command. Enables or disables raw NMEA logging.

Detailed Description

Function Documentation

◆ neo6_dumpnmea_handler()

ERR_te neo6_dumpnmea_handler ( uint32_t argc,
char ** argv )
static

CLI handler for the "dumpnmea" command. Enables or disables raw NMEA logging.

Expected invocation: neo6 dumpnmea <true|false>

When enabled, each complete NMEA sentence is logged via the log subsystem before being parsed, useful for debugging raw GPS output.

Parameters
[in]argcArgument count. Must be exactly 3.
[in]argvArgument list: argv[0] = "neo6", argv[1] = "dumpnmea", argv[2] = "true" or "false".
Returns
  • ERR_OK on success
  • ERR_INVALID_ARGUMENT if argc != 3 or argv[2] is not "true" or "false"

Definition at line 864 of file neo6.c.

864 {
865 if(argc != 3) {
866 LOG_ERROR(
867 internal_state.subsys,
868 internal_state.log_level,
869 "neo6_dumpnmea_handler: invalid arguments"
870 );
871
873 }
874
875 if(str_cmp(argv[2], "true") == true) {
876 internal_state.dump_raw_nmea = true;
877 }
878 else if(str_cmp(argv[2], "false") == true) {
879 internal_state.dump_raw_nmea = false;
880 }
881 else {
882 LOG_ERROR(
883 internal_state.subsys,
884 internal_state.log_level,
885 "neo6_dumpnmea_handler: invalid arguments"
886 );
887
889 }
890
891 return ERR_OK;
892}
static struct internal_state_s internal_state
Singleton instance of the SysTick driver internal state.
bool str_cmp(const char *str1, const char *str2)
Compares two null-terminated strings for equality.
Definition common.c:248
@ ERR_OK
Definition err.h:36
@ ERR_INVALID_ARGUMENT
Definition err.h:38
#define LOG_ERROR(subsys, lvl, fmt,...)
Definition log.h:258
Here is the call graph for this function: