pull/22/head
pa3gsb 2022-01-24 20:36:33 +01:00
rodzic 556705ac9d
commit 18db3ebc0c
4 zmienionych plików z 20 dodań i 8 usunięć

Wyświetl plik

@ -78,7 +78,7 @@ int initRadioberry() {
sem_init(&spi_msg, 0, 0);
sem_init(&i2c_meas, 0, 0);
gettimeofday(&t20, 0);
gettimeofday(&t20, 0);
memset(commands,0,256); // initialise the commands.
@ -87,13 +87,23 @@ int initRadioberry() {
exit(-1);
}
rb_info.command_data = 0x0;
int init = 0;
do {
//required to retrieve gateware information.
if (ioctl(fd_rb, RADIOBERRY_IOC_COMMAND, &rb_info) == -1) {
fprintf(stderr, "RADIOBERRY_IOC_COMMAND Error.");
exit(-1);
}
rb_info.command_data = 0x0;
//required to retrieve gateware information.
if (ioctl(fd_rb, RADIOBERRY_IOC_COMMAND, &rb_info) == -1) {
fprintf(stderr, "RADIOBERRY_IOC_COMMAND Error.");
exit(-1);
}
if (rb_info.major == 0) sleep(1);
init++;
} while (rb_info.major == 0 && init < 10);
gateware_major_version = rb_info.major;
gateware_minor_version = rb_info.minor;
@ -458,6 +468,8 @@ void send_control(unsigned char command) {
fprintf(stderr, "Could not sent commando to radioberry device.");
}
//fprintf(stderr, "RB Gateware control = %02X \n", rb_info.rb_command);
rb_control = rb_info.rb_command;
}

Wyświetl plik

@ -26,7 +26,7 @@
#include <netinet/tcp.h>
#define FIRMWAREVERSION "2021.09.26"
#define FIRMWAREVERSION "2022.01.24"
#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.