SP8EBC-ParaTNC/system/src/aprs/beacon.c

36 wiersze
1.3 KiB
C
Czysty Zwykły widok Historia

2017-08-20 12:41:17 +00:00
/*
* beacon.c
*
* Created on: 01.07.2017
* Author: mateusz
*/
#include "aprs/beacon.h"
#include "main.h"
#include "rte_main.h"
2017-08-20 12:41:17 +00:00
#include "station_config.h"
void SendOwnBeacon(void) {
// BcnLng = sprintf(BcnInfoField, "=%07.2f%c%c%08.2f%c%c %s", this->Settings.Lat, this->Settings.LatNS, this->Settings.BcnSymbolF, this->Settings.Lon, this->Settings.LonWE, this->Settings.BcnSymbolS, this->Settings.Comment);
2019-01-27 11:34:43 +00:00
main_own_aprs_msg_len = sprintf(main_own_aprs_msg, "=%07.2f%c%c%08.2f%c%c %s\0", (float)_LAT, _LATNS, _SYMBOL_F, (float)_LON, _LONWE, _SYMBOL_S, _COMMENT);
main_own_aprs_msg[main_own_aprs_msg_len] = 0;
2017-08-20 12:41:17 +00:00
// fifo_flush(&a.tx_fifo);
2019-01-27 11:34:43 +00:00
ax25_sendVia(&main_ax25, main_own_path, main_own_path_ln, main_own_aprs_msg, main_own_aprs_msg_len);
2017-08-20 12:41:17 +00:00
after_tx_lock = 1;
// for(jj = 0; jj <= 0xFBFFF; jj++);
// while(ax25.dcd == true);
2019-01-26 22:18:25 +00:00
afsk_txStart(&main_afsk);
2017-08-20 12:41:17 +00:00
}
void SendStartup(void) {
main_own_aprs_msg_len = sprintf(main_own_aprs_msg, "> START boot_cnt %#.2x hf_cnt %#.2x hf_pc %#.8x hf_lr %#.8x", rte_main_boot_cycles, rte_main_hard_faults, rte_main_hardfault_pc, rte_main_hardfault_lr);
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);
after_tx_lock = 1;
// for(jj = 0; jj <= 0xFBFFF; jj++);
// while(ax25.dcd == true);
afsk_txStart(&main_afsk);
}