Project-CETI / whale-tag-embedded

Source code for the software that is used to build the image for the embedded computer inside the Whale Tags to be deployed onto sperm whales for project CETI
Apache License 2.0
12 stars 5 forks source link

Power savings #46

Closed msalinoh closed 1 year ago

msalinoh commented 1 year ago

function name prefixing incorporated into CETI_LOG() macro, implements disabling wifi and activity LED after deployment with grace period of 10 minutes #13

MattCummings0517 commented 1 year ago

There's a lot here. Just wondering how much of it has been tested on the hardware?

msalinoh commented 1 year ago

It was tested by applying light pressure to the pressure sensor before and after the 10 minute grace period, and observing the pi's activity LED turning of, and the pi disconnecting from wifi after the period, but not before.

Most of the files modified are due to my change of CETI_LOG to automatically prefixing the function name in the log (see util/logging.h)

The power saving changes are implemented in state_machine.c L218 and util/power.c

Would it be worthwhile to resume pi LED activity when "surface" conditions are detected?

MattCummings0517 commented 1 year ago

Looks good to me. I guess I really don't see any benefit to reactivating the LED activity at the surface.

Once this is merged I will do some follow up testing on my end and update my test system hardware. Let me know if there is anything else needed from me on this update. I can merge it if needed, but I suppose we should wait for Joseph's review...