summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bus.c8
-rw-r--r--device-functions.c2
-rw-r--r--flash.c4
-rw-r--r--globals.h4
-rw-r--r--instr-daemon.c3
-rw-r--r--menus.c3
6 files changed, 14 insertions, 10 deletions
diff --git a/bus.c b/bus.c
index 2e3bf60..ee0f8cb 100644
--- a/bus.c
+++ b/bus.c
@@ -17,6 +17,7 @@
#include <inttypes.h>
#include "globals.h"
#include "bus.h"
+#include "version.h"
#define GPIO_SYSFSPATH "/sys/class/gpio"
#define GPIO_EXPORTNODE "export"
@@ -356,6 +357,13 @@ void bus_init()
globals.HWDetect.beaglebone = util_is_beaglebone();
globals.HWDetect.olimex = util_is_olimex();
+ strcpy(globals.HWDetect.firmware,FW_VERSION);
+ if (globals.HWDetect.beaglebone) {
+ strcat(globals.HWDetect.firmware,"BB");
+ } else if (globals.HWDetect.olimex) {
+ strcat(globals.HWDetect.firmware,"OL");
+ }
+
globals.HWDetect.has_i2c = globals.HWDetect.beaglebone || globals.HWDetect.olimex;
globals.HWDetect.has_gpmc = globals.HWDetect.beaglebone || globals.HWDetect.olimex;
globals.HWDetect.has_gpio = globals.HWDetect.beaglebone || globals.HWDetect.olimex;
diff --git a/device-functions.c b/device-functions.c
index 98b51d5..997390f 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -65,7 +65,7 @@ void idn_string(gchar** response)
*response = g_strdup_printf ("AVTECH ELECTROSYSTEMS,%s,SN:%s,v%s",
globals.Flash.model_num,
globals.Flash.serial_num,
- FW_VERSION);
+ globals.HWDetect.firmware);
}
diff --git a/flash.c b/flash.c
index ab5ebb2..83ed642 100644
--- a/flash.c
+++ b/flash.c
@@ -1,7 +1,6 @@
#include "globals.h"
#include "lcd.h"
#include "i2c.h"
-#include "version.h"
#include "flash.h"
#include "device-functions.h"
#include <stdint.h>
@@ -519,9 +518,6 @@ static void initFlashValues(FlashStruct *mem)
mem->pcb116c_mon=1; /* more recent ADC, different reading code */
mem->warn_even_if_output_off=0;
- strcpy(mem->spec_func_lib,"Not used");
- strcpy(mem->firmware,FW_VERSION);
-
mem->enable_avrq_extra_ampls=0;
for (i=0; i<points_in_range; i++) {
diff --git a/globals.h b/globals.h
index 90e4173..baea76a 100644
--- a/globals.h
+++ b/globals.h
@@ -429,8 +429,7 @@ typedef struct {
char ChanKey_test_delay_mode; /* 193 */
- char spec_func_lib[10]; /* 194 - name of the special functions library used. Normally spec1.lib */
- char firmware[16]; /* 204 - name of the special functions library used. Normally spec1.lib */
+ char obs_unused[26]; /* 194 - unused */
char sync_only; /* 220 */
@@ -831,6 +830,7 @@ typedef struct {
bool has_gpmc;
bool has_gpio;
char remount_point[128];
+ char firmware[16];
} HWDetectStruct;
diff --git a/instr-daemon.c b/instr-daemon.c
index 4fc55b0..63bc161 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -232,9 +232,10 @@ int main(int argc, char **argv)
initFlash (&globals.Flash, FALSE, 0);
- gchar *message = g_strdup_printf ("%s, S/N %s, GPIB addr %d. Allow 60sec power-off period between power-ups.",
+ gchar *message = g_strdup_printf ("%s, S/N %s, FW %s, GPIB addr %d. Avtech Electrosystems Ltd.",
globals.Flash.model_num,
globals.Flash.serial_num,
+ globals.HWDetect.firmware,
globals.Flash.gpib_address);
LCD_display_extended_message (message, FALSE, FALSE);
g_free (message);
diff --git a/menus.c b/menus.c
index a17869c..ebf0e78 100644
--- a/menus.c
+++ b/menus.c
@@ -4,7 +4,6 @@
#include "error_utils.h"
#include "string_utils.h"
#include "device-functions.h"
-#include "version.h"
#include "flash.h"
#include "nicutils.h"
#include "menus.h"
@@ -2813,7 +2812,7 @@ static void Nonstd_menu_model_info(void)
gchar *message = g_strdup_printf ("Avtech Electrosystems Ltd., since 1975. Model %s, S/N %s, FW v%s.",
globals.Flash.model_num,
globals.Flash.serial_num,
- FW_VERSION);
+ globals.HWDetect.firmware);
LCD_display_extended_message (message, TRUE, FALSE);
g_free (message);