projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Remove ao_telemetry_orig.c and ao_telemetry_tiny.c
[fw/altos]
/
src
/
ao_config.c
diff --git
a/src/ao_config.c
b/src/ao_config.c
index c7fc7dd234786debbe434da390ba378ff286d2c0..813164eadbb84a33108ec76059384f37605605bc 100644
(file)
--- a/
src/ao_config.c
+++ b/
src/ao_config.c
@@
-18,8
+18,8
@@
#include "ao.h"
__xdata struct ao_config ao_config;
#include "ao.h"
__xdata struct ao_config ao_config;
-__
x
data uint8_t ao_config_loaded;
-__
x
data uint8_t ao_config_dirty;
+__
p
data uint8_t ao_config_loaded;
+__
p
data uint8_t ao_config_dirty;
__xdata uint8_t ao_config_mutex;
#define AO_CONFIG_DEFAULT_MAIN_DEPLOY 250
__xdata uint8_t ao_config_mutex;
#define AO_CONFIG_DEFAULT_MAIN_DEPLOY 250
@@
-116,8
+116,9
@@
void
ao_config_callsign_set(void) __reentrant
{
uint8_t c;
ao_config_callsign_set(void) __reentrant
{
uint8_t c;
- char callsign[AO_MAX_CALLSIGN + 1];
+
static __xdata
char callsign[AO_MAX_CALLSIGN + 1];
+ memset(callsign, '\0', sizeof callsign);
ao_cmd_white();
c = 0;
while (ao_cmd_lex_c != '\n') {
ao_cmd_white();
c = 0;
while (ao_cmd_lex_c != '\n') {
@@
-131,8
+132,6
@@
ao_config_callsign_set(void) __reentrant
return;
ao_mutex_get(&ao_config_mutex);
_ao_config_get();
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;
memcpy(&ao_config.callsign, &callsign,
AO_MAX_CALLSIGN + 1);
ao_config_dirty = 1;
@@
-336,7
+335,7
@@
ao_config_log_set(void) __reentrant
#endif /* HAS_EEPROM */
struct ao_config_var {
#endif /* HAS_EEPROM */
struct ao_config_var {
-
const char
*str;
+
__code char
*str;
void (*set)(void) __reentrant;
void (*show)(void) __reentrant;
};
void (*set)(void) __reentrant;
void (*show)(void) __reentrant;
};