diff options
author | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:37:39 +0900 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:37:39 +0900 |
commit | 0744c2015b73fa6319cb486fca79cc2c83373985 (patch) | |
tree | afa06e6040139084c60d724981133ce32bcd583d | |
parent | b6bb15deeba5ae52b822b776180dd06d5cb4ee6d (diff) |
show FW version and controller type (BB or OL) at startupINSTRUMENT_6_2_03
-rw-r--r-- | bus.c | 8 | ||||
-rw-r--r-- | device-functions.c | 2 | ||||
-rw-r--r-- | flash.c | 4 | ||||
-rw-r--r-- | globals.h | 4 | ||||
-rw-r--r-- | instr-daemon.c | 3 | ||||
-rw-r--r-- | menus.c | 3 |
6 files changed, 14 insertions, 10 deletions
@@ -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); } @@ -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++) { @@ -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); @@ -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); |