File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class Constants
12
12
static public string CalibrationFile = DataFilePath + "CalibrationData.xml" ;
13
13
static public string SettingsFile = DataFilePath + "QA350Settings.xml" ;
14
14
15
- static public double Version = 1.771 ;
15
+ static public double Version = 1.772 ;
16
16
17
17
static public Int32 RequiredFwVersion = 12 ;
18
18
}
Original file line number Diff line number Diff line change @@ -300,8 +300,15 @@ private void TryConnect()
300
300
// Attempt to connect to the device upon app startup
301
301
if ( Hardware . Open ( ) )
302
302
{
303
+ Int32 productId = Hardware . GetProductId ( ) ;
304
+ if ( productId != 12345678 )
305
+ {
306
+ MessageBox . Show ( "Unrecognized product." ) ;
307
+ Hardware . Close ( ) ;
308
+ return ;
309
+ }
310
+
303
311
Int32 fwVersion = Hardware . GetFirmwareVersion ( ) ;
304
-
305
312
if ( fwVersion != Constants . RequiredFwVersion )
306
313
{
307
314
BadFirmwareVersion = true ;
Original file line number Diff line number Diff line change @@ -141,6 +141,11 @@ static public int GetFirmwareVersion()
141
141
return SendRecv ( 0xFE ) ;
142
142
}
143
143
144
+ static public int GetProductId ( )
145
+ {
146
+ return SendRecv ( 0xFD ) ;
147
+ }
148
+
144
149
static public int GetMspTemp ( )
145
150
{
146
151
return SendRecv ( 51 ) ;
You can’t perform that action at this time.
0 commit comments