added send_packet

pull/152/head
alanbjohnston 4 years ago committed by GitHub
parent 0c66e7390e
commit 27d30f275f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -21,6 +21,7 @@
#include "cubesatsim.h" #include "cubesatsim.h"
#include "DumbTXSWS.h" #include "DumbTXSWS.h"
#include <Arduino-APRS-Library.h>
void setup() { void setup() {
@ -41,8 +42,10 @@ void setup() {
Serial.println("\n\nCubeSatSim Pico v0.1 starting...\n\n"); Serial.println("\n\nCubeSatSim Pico v0.1 starting...\n\n");
mode = FSK; mode = AFSK;
frameCnt = 1;
// mode = FSK;
// frameCnt = 1;
Serial.println("v1 Present with UHF BPF\n"); Serial.println("v1 Present with UHF BPF\n");
txLed = 2; txLed = 2;
@ -105,9 +108,15 @@ void setup() {
for (int j = 0; j < sin_samples; j++) { for (int j = 0; j < sin_samples; j++) {
sin_map[j] = (short int)(amplitude * sin((float)(2 * M_PI * j / sin_samples))); sin_map[j] = (short int)(amplitude * sin((float)(2 * M_PI * j / sin_samples)));
// printf(" %d", sin_map[j]); // printf(" %d", sin_map[j]);
// } // }
// printf("\n"); // printf("\n");
} }
} else if (mode == AFSK) {
set_pin(AUDIO_OUT_PIN);
char callsign[] = "W3ZM";
set_callsign(callsign);
} }
// program Transceiver board // program Transceiver board
@ -122,9 +131,12 @@ void loop() {
// encode as digits (APRS or CW mode) or binary (DUV FSK) // encode as digits (APRS or CW mode) or binary (DUV FSK)
get_tlm_fox(); if ((mode == BPSK) || (mode = FSK))
get_tlm_fox();
else if (mode == AFSK)
send_packet();
test_radio(); // test_radio();
digitalWrite(LED_BUILTIN, LOW); digitalWrite(LED_BUILTIN, LOW);
@ -139,6 +151,16 @@ void loop() {
} }
void send_packet() {
digitalWrite(PTT_PIN, LOW);
digitalWrite(LED_BUILTIN, LOW);
send_packet(_FIXPOS_STATUS);
digitalWrite(PTT_PIN, HIGH);
digitalWrite(LED_BUILTIN, HIGH);
}
void get_tlm_fox() { void get_tlm_fox() {
int i; int i;
long int sync = syncWord; long int sync = syncWord;

Loading…
Cancel
Save

Powered by TurnKey Linux.