File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
samples/demos/end_to_end_tank Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -135,8 +135,8 @@ def read_properties():
135135 properties [prop ] = None
136136
137137 # Read the XBee settings saved in the firmware.
138- for prop in xbee_properties :
139- read_value = xbee .atcmd (xbee_properties [ prop ] )
138+ for prop , atcmd in xbee_properties . items () :
139+ read_value = xbee .atcmd (atcmd )
140140 if read_value is None :
141141 properties [prop ] = None
142142 elif prop in text_properties :
@@ -164,7 +164,7 @@ def save_properties(properties):
164164 # Save XBee properties in the XBee firmware.
165165 for prop in xbee_properties :
166166 # Skip empty settings.
167- if prop not in properties or properties [ prop ] is None :
167+ if properties . get ( prop ) is None :
168168 continue
169169 print (" - Saving property '%s' with '%s' in the XBee device" %
170170 (prop , properties [prop ]))
You can’t perform that action at this time.
0 commit comments