tx_freq_hz sets frequency and tx_channel sets channel -50k step

pull/2/head
Alan Johnston 7 years ago
parent d81fff6df9
commit ba678c5625

@ -217,6 +217,7 @@ afsk/ax5043.o: afsk/ax25.h
afsk/ax5043.o: afsk/ax5043.h afsk/ax5043.o: afsk/ax5043.h
afsk/ax5043.o: afsk/status.h afsk/ax5043.o: afsk/status.h
afsk/ax5043.o: afsk/utils.h afsk/ax5043.o: afsk/utils.h
afsk/ax5043.o: afsk/main.c
afsk/ax5043.o: ax5043/spi/ax5043spi.h afsk/ax5043.o: ax5043/spi/ax5043spi.h
cd afsk; gcc -I ../ax5043 -pedantic -Wconversion -Wall -Wextra -c ax5043.c; cd .. cd afsk; gcc -I ../ax5043 -pedantic -Wconversion -Wall -Wextra -c ax5043.c; cd ..

@ -34,6 +34,8 @@ static size_t __tx_buf_idx = 0;
static uint8_t __tx_fifo_chunk[AX5043_FIFO_MAX_SIZE]; static uint8_t __tx_fifo_chunk[AX5043_FIFO_MAX_SIZE];
static uint32_t __tx_remaining = 0; static uint32_t __tx_remaining = 0;
extern uint32_t tx_freq_hz;
/** /**
* FIFO command for the preamble. The third byte corresponds the length of * FIFO command for the preamble. The third byte corresponds the length of
* the preamble and is set by the TX routine for every frame * 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; return ret;
} }
ret = ax5043_set_tx_freq(conf, TX_FREQ_HZ); ret = ax5043_set_tx_freq(conf, tx_freq_hz);
if (ret) { if (ret) {
return ret; return ret;
} }

@ -61,6 +61,9 @@
#define POWER 2 #define POWER 2
#define VBATT 15 #define VBATT 15
uint32_t tx_freq_hz = 440310000;
uint32_t tx_channel = 2;
ax5043_conf_t hax5043; ax5043_conf_t hax5043;
ax25_conf_t hax25; ax25_conf_t hax25;
@ -172,6 +175,8 @@ int main(void) {
int ret; int ret;
uint8_t data[1024]; uint8_t data[1024];
tx_freq_hz -= tx_channel * 50000;
init_rf(); init_rf();
// ax25_init(&hax25, (uint8_t *) "CubeSatSim", '2', (uint8_t *) CALLSIGN, '2', // ax25_init(&hax25, (uint8_t *) "CubeSatSim", '2', (uint8_t *) CALLSIGN, '2',

@ -62,6 +62,8 @@
#define CURRENT 1 #define CURRENT 1
#define POWER 2 #define POWER 2
uint32_t tx_freq_hz = 440390000;
long int timestamp = 0; long int timestamp = 0;
extern uint8_t axradio_rxbuffer[]; extern uint8_t axradio_rxbuffer[];
void *transmit(void *arg); void *transmit(void *arg);

Loading…
Cancel
Save

Powered by TurnKey Linux.