@@ -60,7 +60,7 @@ def read_sensor(self, id):
60
60
}]
61
61
}
62
62
63
- def message (self , message , type = None , channel = None ):
63
+ def message (self , message , type = None ):
64
64
# Send new log message via broker
65
65
# No inherent return value
66
66
message_message = {
@@ -70,12 +70,6 @@ def message(self, message, type=None, channel=None):
70
70
"args" : {
71
71
"message" : message ,
72
72
"message_type" : type
73
- },
74
- "body" : {
75
- "kind" : "channel" ,
76
- "args" : {
77
- "channel_name" : channel
78
- }
79
73
}
80
74
}
81
75
}
@@ -111,29 +105,60 @@ def wait(self, duration):
111
105
def e_stop (self ):
112
106
# Tell bot to emergency stop
113
107
# No inherent return value
114
- e_stop_message = {
115
- ** RPC_REQUEST ,
116
- "body" : {
117
- "kind" : "emergency_lock" ,
118
- "args" : {}
119
- }
120
- }
121
108
122
- self .broker_connect .publish (e_stop_message )
109
+ new_message = {
110
+ "kind" : "rpc_request" ,
111
+ "args" : {
112
+ "label" : "" ,
113
+ "priority" : 9000
114
+ },
115
+ "body" : [
116
+ {
117
+ "kind" : "emergency_lock" ,
118
+ "args" : {}
119
+ }
120
+ ]
121
+ }
122
+ # e_stop_message = {
123
+ # **RPC_REQUEST,
124
+ # "body": {
125
+ # "kind": "emergency_lock",
126
+ # "args": {}
127
+ # }
128
+ # }
129
+
130
+ # self.broker_connect.publish(e_stop_message)
131
+ self .broker_connect .publish (new_message )
123
132
return print ("Triggered device emergency stop." )
124
133
125
134
def unlock (self ):
126
135
# Tell bot to unlock
127
136
# No inherent return value
128
- unlock_message = {
129
- ** RPC_REQUEST ,
130
- "body" : {
131
- "kind" : "emergency_unlock" ,
132
- "args" : {}
133
- }
137
+
138
+ # unlock_message = {
139
+ # **RPC_REQUEST,
140
+ # "body": {
141
+ # "kind": "emergency_unlock",
142
+ # "args": {}
143
+ # }
144
+ # }
145
+
146
+ new_unlock = {
147
+ "kind" : "rpc_request" ,
148
+ "args" : {
149
+ "label" : "" ,
150
+ "priority" : 9000
151
+ },
152
+ "body" : [
153
+ {
154
+ "kind" : "emergency_unlock" ,
155
+ "args" : {}
156
+ }
157
+ ]
134
158
}
159
+ self .broker_connect .publish (new_unlock )
135
160
136
- self .broker_connect .publish (unlock_message )
161
+ # self.broker_connect.publish(unlock_message)
137
162
return print ("Triggered device unlock." )
138
163
139
164
def reboot (self ):
0 commit comments