File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1111"""
1212__author__ = "Russell Green"
1313__license__ = "MIT"
14- __version__ = "1.0.3 "
14+ __version__ = "1.0.4 "
1515__maintainer__ = "Russell.Green"
1616__email__ = "me@rusty.green"
1717__status__ = "Production"
@@ -241,13 +241,21 @@ def set_get_pin_value(pin, value):
241241
242242
243243def get_pin_history (pin ):
244+ """Gets pin history
245+
246+ Retrieves the pin history record if exists, otherwise creates a new one.
247+ """
244248 if pin in gpio_pin_history :
245249 return gpio_pin_history [pin ]
246250 else :
247- return {"lastValue " : None }
251+ return {"lastChange " : None }
248252
249253
250254def set_pin_history (pin ):
255+ """Sets pin history
256+
257+ Sets a pin history record for a given pin.
258+ """
251259 history = {"lastChange" : datetime .datetime .now ()}
252260 record = get_pin_history (pin )
253261 record .update (history )
You can’t perform that action at this time.
0 commit comments