Commits

LabJack committed c1a42d4

Removing WIFI tag from LED regs.

  • Participants
  • Parent commits becadb0

Comments (0)

Files changed (2)

File LabJack/LJM/ljm_constants.json

    {"address":48003, "name":"POWER_ETHERNET", "type":"UINT16", "devices":[{"device":"T7", "fwmin":0.86}], "readwrite":"RW", "tags":["CONFIG", "ETHERNET"], "description":"The current ON/OFF state of the Ethernet module. Provided to optionally reduce power consumption."},
    {"address":48004, "name":"POWER_WIFI", "type":"UINT16", "devices":[{"device":"T7", "fwmin":0.86}], "readwrite":"RW", "tags":["CONFIG", "WIFI"], "description":"The current ON/OFF state of the WiFi module. Provided to optionally reduce power consumption."},
    {"address":48005, "name":"POWER_AIN", "type":"UINT16", "devices":[{"device":"T7", "fwmin":0.86}], "readwrite":"RW", "tags":["CONFIG", "AIN"], "description":"The current ON/OFF state of the analog input module. Provided to optionally reduce power consumption."},
-   {"address":48006, "name":"POWER_LED", "type":"UINT16", "devices":[{"device":"T7", "fwmin":0.86}], "readwrite":"RW", "tags":["CONFIG", "WIFI"], "description":"The current ON/OFF state of the LEDs. Provided to optionally reduce power consumption."},
+   {"address":48006, "name":"POWER_LED", "type":"UINT16", "devices":[{"device":"T7", "fwmin":0.86}], "readwrite":"RW", "tags":["CONFIG"], "description":"The current ON/OFF state of the LEDs. Provided to optionally reduce power consumption."},
    {"address":48053, "name":"POWER_ETHERNET_DEFAULT", "type":"UINT16", "devices":[{"device":"T7", "fwmin":0.86}], "readwrite":"RW", "tags":["CONFIG", "ETHERNET"], "description":"The ON/OFF state of the Ethernet module after a power-cycle to the device."},
    {"address":48054, "name":"POWER_WIFI_DEFAULT", "type":"UINT16", "devices":[{"device":"T7", "fwmin":0.86}], "readwrite":"RW", "tags":["CONFIG", "WIFI"], "description":"The ON/OFF state of the WiFi module after a power-cycle to the device."},
    {"address":48055, "name":"POWER_AIN_DEFAULT", "type":"UINT16", "devices":[{"device":"T7", "fwmin":0.86}], "readwrite":"RW", "tags":["CONFIG", "AIN"], "description":"The ON/OFF state of the analog input module after a power-cycle to the device."},
-   {"address":48056, "name":"POWER_LED_DEFAULT", "type":"UINT16", "devices":[{"device":"T7", "fwmin":0.86}], "readwrite":"RW", "tags":["CONFIG", "WIFI"], "description":"The ON/OFF state of the LEDs after a power-cycle to the device."},
+   {"address":48056, "name":"POWER_LED_DEFAULT", "type":"UINT16", "devices":[{"device":"T7", "fwmin":0.86}], "readwrite":"RW", "tags":["CONFIG"], "description":"The ON/OFF state of the LEDs after a power-cycle to the device."},
 
    {"address":49000, "name":"IO_CONFIG_CHECK_FOR_FACTORY", "type":"UINT32", "devices":["T7"], "readwrite":"R", "tags":["CONFIG"], "description":"Returns 1 if default settings are the same as factory settings."},
    {"address":49002, "name":"IO_CONFIG_SET_DEFAULT_TO_CURRENT", "type":"UINT32", "devices":["T7"], "readwrite":"W", "tags":["CONFIG"], "description":"Write a 1 to cause new default (reboot/power-up) values to be saved to flash.  Current values are retrieved and saved as the new defaults."},

File save_changes.py

 import json
 import os
 import subprocess
+import sys
 
 import ljmmm
 
+if len(sys.argv) > 2:
+    print 'Too many args. Commit message may be arg 0.'
+    sys.exit(1)
+    
+commit_message = "Incremental JSON update."
+if len(sys.argv) == 2:
+    commit_message = sys.argv[1]
+
 print 'Checking JSON file...'
 json_file_path = os.path.join('LabJack', 'LJM', 'ljm_constants.json')
 try:
 
 print 'Saving to Git repository...'
 subprocess.check_call('git pull', shell=True)
-subprocess.call('git commit -a -m "Incremental JSON update."', shell=True)
+subprocess.call('git commit -a -m "%s"' % commit_message, shell=True)
 subprocess.call('git push', shell=True)
 print 'Finished!'