kopia lustrzana https://github.com/SP8EBC/ParaTNC
sending rtc state and battery voltage in bootup beacon
rodzic
68fe300015
commit
937e26b922
|
@ -1029,11 +1029,11 @@ int main(int argc, char* argv[]){
|
|||
|
||||
if (main_config_data_basic-> beacon_at_bootup == 1) {
|
||||
#if defined(PARAMETEO)
|
||||
beacon_send_own(system_is_rtc_ok());
|
||||
beacon_send_own(rte_main_battery_voltage, system_is_rtc_ok());
|
||||
main_wait_for_tx_complete();
|
||||
delay_fixed(1500);
|
||||
#else
|
||||
beacon_send_own(0);
|
||||
beacon_send_own(0, 0);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ void packet_tx_handler(const config_data_basic_t * const config_basic, const con
|
|||
|
||||
packet_tx_multi_per_call_handler();
|
||||
|
||||
beacon_send_own(0);
|
||||
beacon_send_own(0, 0);
|
||||
|
||||
packet_tx_beacon_counter = 0;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ extern "C"
|
|||
{
|
||||
#endif
|
||||
|
||||
void beacon_send_own(uint16_t voltage);
|
||||
void beacon_send_own(uint16_t voltage, uint8_t rtc_ok);
|
||||
void beacon_send_on_startup(void);
|
||||
void beacon_send_from_user_content(uint16_t content_ln, char* content_ptr);
|
||||
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
void beacon_send_own(uint16_t voltage) {
|
||||
void beacon_send_own(uint16_t voltage, uint8_t rtc_ok) {
|
||||
main_wait_for_tx_complete();
|
||||
if (voltage == 0) {
|
||||
if (voltage == 0 && rtc_ok == 0) {
|
||||
main_own_aprs_msg_len = sprintf(main_own_aprs_msg, "=%s%c%c%s%c%c %s", main_string_latitude, main_config_data_basic->n_or_s, main_symbol_f, main_string_longitude, main_config_data_basic->e_or_w, main_symbol_s, main_config_data_basic->comment);
|
||||
}
|
||||
else {
|
||||
main_own_aprs_msg_len = sprintf(main_own_aprs_msg, "=%s%c%c%s%c%c %s [is_rtc_ok: %d]", main_string_latitude, main_config_data_basic->n_or_s, main_symbol_f, main_string_longitude, main_config_data_basic->e_or_w, main_symbol_s, main_config_data_basic->comment, (int)voltage);
|
||||
main_own_aprs_msg_len = sprintf(main_own_aprs_msg, "=%s%c%c%s%c%c %s [vbat: %d][rtc_ok: %d]", main_string_latitude, main_config_data_basic->n_or_s, main_symbol_f, main_string_longitude, main_config_data_basic->e_or_w, main_symbol_s, main_config_data_basic->comment, (int)voltage , (int)rtc_ok);
|
||||
}
|
||||
main_own_aprs_msg[main_own_aprs_msg_len] = 0;
|
||||
ax25_sendVia(&main_ax25, main_own_path, main_own_path_ln, main_own_aprs_msg, main_own_aprs_msg_len);
|
||||
|
|
Ładowanie…
Reference in New Issue