X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao_config.c;h=657c7a8a17a976ab62ba2ea85e53a406d0535a4d;hp=e32dca4537b26df3d01cfc94bd5ffd3f5ac32a05;hb=7cb9fb675f56bf30ab6bf0bcdc5cb679709ffe3e;hpb=38a0b61b0a0b3c00f064c8d562950a17a6ddff4a diff --git a/ao_config.c b/ao_config.c index e32dca45..657c7a8a 100644 --- a/ao_config.c +++ b/ao_config.c @@ -24,7 +24,7 @@ __xdata uint8_t ao_config_mutex; #define AO_CONFIG_DEFAULT_MAIN_DEPLOY 250 #define AO_CONFIG_DEFAULT_RADIO_CHANNEL 0 -#define AO_CONFIG_DEFAULT_CALLSIGN "KD7SGQ" +#define AO_CONFIG_DEFAULT_CALLSIGN "KD7SQG" #define AO_CONFIG_DEFAULT_ACCEL_ZERO_G 16000 static void @@ -87,6 +87,8 @@ ao_config_callsign_set(void) __reentrant return; ao_mutex_get(&ao_config_mutex); _ao_config_get(); + while (c < AO_MAX_CALLSIGN + 1) + callsign[c++] = '\0'; memcpy(&ao_config.callsign, &callsign, AO_MAX_CALLSIGN + 1); ao_config_dirty = 1; @@ -97,7 +99,7 @@ ao_config_callsign_set(void) __reentrant void ao_config_radio_channel_show(void) __reentrant { - uint32_t freq = 435550L + ao_config.radio_channel * 100L; + uint32_t freq = 434550L + ao_config.radio_channel * 100L; uint16_t mhz = freq / 1000L; uint16_t khz = freq % 1000L; @@ -188,7 +190,7 @@ ao_config_accel_zero_g_set(void) __reentrant } struct ao_config_var { - uint8_t cmd; + char cmd; void (*set)(void) __reentrant; void (*show)(void) __reentrant; const char *help; @@ -225,7 +227,7 @@ __code struct ao_config_var ao_config_vars[] = { void ao_config_set(void) { - uint8_t c; + char c; uint8_t cmd; void (*__xdata func)(void) __reentrant;