diff --git a/Makefile b/Makefile index 6ea66e39..6b5d00dc 100644 --- a/Makefile +++ b/Makefile @@ -217,6 +217,7 @@ afsk/ax5043.o: afsk/ax25.h afsk/ax5043.o: afsk/ax5043.h afsk/ax5043.o: afsk/status.h afsk/ax5043.o: afsk/utils.h +afsk/ax5043.o: afsk/main.c afsk/ax5043.o: ax5043/spi/ax5043spi.h cd afsk; gcc -I ../ax5043 -pedantic -Wconversion -Wall -Wextra -c ax5043.c; cd .. diff --git a/afsk/ax5043.c b/afsk/ax5043.c index c4112f6a..f74b4ad9 100644 --- a/afsk/ax5043.c +++ b/afsk/ax5043.c @@ -34,6 +34,8 @@ static size_t __tx_buf_idx = 0; static uint8_t __tx_fifo_chunk[AX5043_FIFO_MAX_SIZE]; static uint32_t __tx_remaining = 0; +extern uint32_t tx_freq_hz; + /** * FIFO command for the preamble. The third byte corresponds the length of * the preamble and is set by the TX routine for every frame @@ -255,7 +257,7 @@ int ax5043_conf_tx_path(ax5043_conf_t *conf) { return ret; } - ret = ax5043_set_tx_freq(conf, TX_FREQ_HZ); + ret = ax5043_set_tx_freq(conf, tx_freq_hz); if (ret) { return ret; } diff --git a/afsk/main.c b/afsk/main.c index 404d1feb..675b78f2 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -61,6 +61,9 @@ #define POWER 2 #define VBATT 15 +uint32_t tx_freq_hz = 440310000; +uint32_t tx_channel = 2; + ax5043_conf_t hax5043; ax25_conf_t hax25; @@ -172,6 +175,8 @@ int main(void) { int ret; uint8_t data[1024]; + tx_freq_hz -= tx_channel * 50000; + init_rf(); // ax25_init(&hax25, (uint8_t *) "CubeSatSim", '2', (uint8_t *) CALLSIGN, '2', diff --git a/cw/cw_main.c b/cw/cw_main.c index 98ec7522..83f4aa88 100644 --- a/cw/cw_main.c +++ b/cw/cw_main.c @@ -62,6 +62,8 @@ #define CURRENT 1 #define POWER 2 +uint32_t tx_freq_hz = 440390000; + long int timestamp = 0; extern uint8_t axradio_rxbuffer[]; void *transmit(void *arg);