|
|
|
@ -117,7 +117,7 @@ int main(int argc, char * argv[]) {
|
|
|
|
|
|
|
|
|
|
|
|
//#ifdef HAB
|
|
|
|
//#ifdef HAB
|
|
|
|
if (hab_mode)
|
|
|
|
if (hab_mode)
|
|
|
|
fprintf(stderr, "HAB mode enabled - balloon icon and BAT only telem and no low voltage shutdown\n");
|
|
|
|
fprintf(stderr, "HAB mode enabled - in APRS balloon icon and no battery saver or low voltage shutdown\n");
|
|
|
|
//#endif
|
|
|
|
//#endif
|
|
|
|
|
|
|
|
|
|
|
|
// FILE * rpitx_restart = popen("sudo systemctl restart rpitx", "r");
|
|
|
|
// FILE * rpitx_restart = popen("sudo systemctl restart rpitx", "r");
|
|
|
|
@ -1072,7 +1072,7 @@ void get_tlm(void) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
printf("Str: %s \n", str);
|
|
|
|
printf("Str: %s \n", str);
|
|
|
|
|
|
|
|
if (mode == CW) {
|
|
|
|
int channel;
|
|
|
|
int channel;
|
|
|
|
for (channel = 1; channel < 7; channel++) {
|
|
|
|
for (channel = 1; channel < 7; channel++) {
|
|
|
|
sprintf(tlm_str, "%d%d%d %d%d%d %d%d%d %d%d%d ",
|
|
|
|
sprintf(tlm_str, "%d%d%d %d%d%d %d%d%d %d%d%d ",
|
|
|
|
@ -1085,17 +1085,18 @@ void get_tlm(void) {
|
|
|
|
//#ifdef HAB
|
|
|
|
//#ifdef HAB
|
|
|
|
// if (mode != AFSK)
|
|
|
|
// if (mode != AFSK)
|
|
|
|
//#endif
|
|
|
|
//#endif
|
|
|
|
if ((!hab_mode) || ((hab_mode) && (mode != AFSK)))
|
|
|
|
// if ((!hab_mode) || ((hab_mode) && (mode != AFSK)))
|
|
|
|
strcat(str, tlm_str);
|
|
|
|
strcat(str, tlm_str);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else { // APRS
|
|
|
|
//#ifdef HAB
|
|
|
|
//#ifdef HAB
|
|
|
|
if ((mode == AFSK) && (hab_mode)) {
|
|
|
|
// if ((mode == AFSK) && (hab_mode)) {
|
|
|
|
sprintf(tlm_str, "BAT %4.2f %5.1f ", batteryVoltage, batteryCurrent);
|
|
|
|
sprintf(tlm_str, "BAT %4.2f %5.1f ", batteryVoltage, batteryCurrent);
|
|
|
|
strcat(str, tlm_str);
|
|
|
|
strcat(str, tlm_str);
|
|
|
|
} else
|
|
|
|
// } else
|
|
|
|
strcat(str, tlm_str); // Is this needed???
|
|
|
|
// strcat(str, tlm_str); // Is this needed???
|
|
|
|
|
|
|
|
}
|
|
|
|
//#endif
|
|
|
|
//#endif
|
|
|
|
// read payload sensor if available
|
|
|
|
// read payload sensor if available
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
|