commit
d6909f439c
|
@ -33,7 +33,7 @@ module CeleryScriptSettingsBag
|
||||||
ALLOWED_POINTER_TYPE = %w(GenericPointer ToolSlot Plant Weed)
|
ALLOWED_POINTER_TYPE = %w(GenericPointer ToolSlot Plant Weed)
|
||||||
ALLOWED_RESOURCE_TYPE = %w(Device Point Plant ToolSlot Weed GenericPointer)
|
ALLOWED_RESOURCE_TYPE = %w(Device Point Plant ToolSlot Weed GenericPointer)
|
||||||
ALLOWED_RPC_NODES = %w(assertion calibrate change_ownership
|
ALLOWED_RPC_NODES = %w(assertion calibrate change_ownership
|
||||||
check_updates dump_info emergency_lock
|
check_updates emergency_lock
|
||||||
emergency_unlock execute execute_script
|
emergency_unlock execute execute_script
|
||||||
factory_reset find_home flash_firmware home
|
factory_reset find_home flash_firmware home
|
||||||
install_farmware install_first_party_farmware _if
|
install_farmware install_first_party_farmware _if
|
||||||
|
@ -42,7 +42,7 @@ module CeleryScriptSettingsBag
|
||||||
send_message set_servo_angle set_user_env sync
|
send_message set_servo_angle set_user_env sync
|
||||||
take_photo toggle_pin update_farmware wait
|
take_photo toggle_pin update_farmware wait
|
||||||
write_pin zero)
|
write_pin zero)
|
||||||
ALLOWED_SPEC_ACTION = %w(dump_info emergency_lock emergency_unlock power_off
|
ALLOWED_SPEC_ACTION = %w(emergency_lock emergency_unlock power_off
|
||||||
read_status reboot sync take_photo)
|
read_status reboot sync take_photo)
|
||||||
ANY_VARIABLE = %i(tool coordinate point identifier)
|
ANY_VARIABLE = %i(tool coordinate point identifier)
|
||||||
BAD_ALLOWED_PIN_MODES = '"%s" is not a valid pin_mode. Allowed values: %s'
|
BAD_ALLOWED_PIN_MODES = '"%s" is not a valid pin_mode. Allowed values: %s'
|
||||||
|
@ -326,10 +326,6 @@ module CeleryScriptSettingsBag
|
||||||
args: [:x, :y, :z],
|
args: [:x, :y, :z],
|
||||||
tags: [:data, :location_like],
|
tags: [:data, :location_like],
|
||||||
},
|
},
|
||||||
dump_info: {
|
|
||||||
tags: [:function, :network_user, :disk_user, :api_writer],
|
|
||||||
docs: "Sends an info dump to server administrators for troubleshooting.",
|
|
||||||
},
|
|
||||||
emergency_lock: {
|
emergency_lock: {
|
||||||
tags: [:function, :firmware_user, :control_flow],
|
tags: [:function, :firmware_user, :control_flow],
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,20 +1,18 @@
|
||||||
class PinBinding < ApplicationRecord
|
class PinBinding < ApplicationRecord
|
||||||
OFF_LIMITS = [
|
OFF_LIMITS = [
|
||||||
2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 19, 21, 23, 24, 25, 27
|
2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 19, 21, 23, 24, 25, 27,
|
||||||
]
|
]
|
||||||
BAD_PIN_NUM = \
|
BAD_PIN_NUM = "The following pin numbers cannot be used: %s" % OFF_LIMITS.join(", ")
|
||||||
"The following pin numbers cannot be used: %s" % OFF_LIMITS.join(", ")
|
|
||||||
|
|
||||||
belongs_to :device
|
belongs_to :device
|
||||||
belongs_to :sequence
|
belongs_to :sequence
|
||||||
enum special_action: { dump_info: "dump_info",
|
enum special_action: { emergency_lock: "emergency_lock",
|
||||||
emergency_lock: "emergency_lock",
|
|
||||||
emergency_unlock: "emergency_unlock",
|
emergency_unlock: "emergency_unlock",
|
||||||
power_off: "power_off",
|
power_off: "power_off",
|
||||||
read_status: "read_status",
|
read_status: "read_status",
|
||||||
reboot: "reboot",
|
reboot: "reboot",
|
||||||
sync: "sync",
|
sync: "sync",
|
||||||
take_photo: "take_photo" }
|
take_photo: "take_photo" }
|
||||||
validates :pin_num, uniqueness: { scope: :device }
|
validates :pin_num, uniqueness: { scope: :device }
|
||||||
|
|
||||||
def fancy_name
|
def fancy_name
|
||||||
|
|
Loading…
Reference in New Issue