kopia lustrzana https://github.com/Qyon/STM32_RTTY
commit
d4db5580cd
12
config.h
12
config.h
|
@ -23,12 +23,12 @@
|
|||
// 7 --> walkie talkies, HT's or other human portable
|
||||
// 8 --> boats, sailboats, RV's or second main mobile
|
||||
// 9 --> Primary Mobile (usually message capable)
|
||||
// 10 --> internet, Igates, echolink, winlink, AVRS, APRN, etc.
|
||||
// 11 --> balloons, aircraft, spacecraft, etc.
|
||||
// 12 --> APRStt, DTMF, RFID, devices, one-way trackers*, etc.
|
||||
// 13 --> Weather stations
|
||||
// 14 --> Truckers or generally full time drivers
|
||||
// 15 --> generic additional station, digi, mobile, wx, etc.
|
||||
// A --> internet, Igates, echolink, winlink, AVRS, APRN, etc.
|
||||
// B --> balloons, aircraft, spacecraft, etc.
|
||||
// C --> APRStt, DTMF, RFID, devices, one-way trackers*, etc.
|
||||
// D --> Weather stations
|
||||
// E --> Truckers or generally full time drivers
|
||||
// F --> generic additional station, digi, mobile, wx, etc.
|
||||
|
||||
#define APRS_COMMENT " Hello from the sky!"
|
||||
#define RTTY_TO_APRS_RATIO 5 //transmit APRS packet with each x RTTY packet
|
||||
|
|
20
main.c
20
main.c
|
@ -200,7 +200,7 @@ int main(void) {
|
|||
|
||||
void send_rtty_packet() {
|
||||
start_bits = RTTY_PRE_START_BITS;
|
||||
int8_t temperatura = radio_read_temperature();
|
||||
int8_t si4032_temperature = radio_read_temperature();
|
||||
|
||||
// voltage = srednia(ADCVal[0] * 600 / 4096);
|
||||
voltage = ADCVal[0] * 600 / 4096;
|
||||
|
@ -220,7 +220,7 @@ void send_rtty_packet() {
|
|||
gpsData.hours, gpsData.minutes, gpsData.seconds,
|
||||
gpsData.lat_raw < 0 ? "-" : "", lat_d, lat_fl,
|
||||
gpsData.lon_raw < 0 ? "-" : "", lon_d, lon_fl,
|
||||
(gpsData.alt_raw / 1000), temperatura, voltage, gpsData.sats_raw,
|
||||
(gpsData.alt_raw / 1000), si4032_temperature, voltage, gpsData.sats_raw,
|
||||
gpsData.ok_packets, gpsData.bad_packets,
|
||||
flaga);
|
||||
CRC_rtty = 0xffff; //possibly not neccessary??
|
||||
|
@ -233,6 +233,22 @@ void send_rtty_packet() {
|
|||
send_cun++;
|
||||
}
|
||||
|
||||
uint16_t gps_CRC16_checksum(char *string) {
|
||||
uint16_t crc = 0xffff;
|
||||
char i;
|
||||
while (*(string) != 0) {
|
||||
crc = crc ^ (*(string++) << 8);
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (crc & 0x8000)
|
||||
crc = (uint16_t) ((crc << 1) ^ 0x1021);
|
||||
else
|
||||
crc <<= 1;
|
||||
}
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
void assert_failed(uint8_t* file, uint32_t line)
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue