Both startup() and check_trigger() were using identical code to append a new entry to the rain.txt trigger log (introduced with https://github.com/pimoroni/enviro/pull/55) when a trigger pulse from the rain sensor is detected - this refactor introduces a new store_rain_trigger_record() method, meaning the code only needs to be in one place.
Both
startup()
andcheck_trigger()
were using identical code to append a new entry to therain.txt
trigger log (introduced with https://github.com/pimoroni/enviro/pull/55) when a trigger pulse from the rain sensor is detected - this refactor introduces a newstore_rain_trigger_record()
method, meaning the code only needs to be in one place.