royvegard/Nano-Basket

Bad success check

Closed this issue · 1 comments

It looks like the check for success / failure to request scene update is checking for the same value (0x23) for both success and failure conditions. This occurs at line 347 of nano_basket_backend.py thus:

      for Res in Response:
         if ('ext' in Res.get_data().keys()):
            if (Res.get_data()['ext'][9] == 0x23):
               print('Data load Success!')
            elif(Res.get_data()['ext'][9] == 0x23):
               print('Data load Fail!')

From the MIDI implementation spec it looks like the failure value should be 0x24:

Function ID (hex) Description/Function
40 Current Scene Data Dump R
23 Data Load Completed E
24 Data Load Error E
21 Write Completed E
22 Write Error E
42 Mode Data R