DIY Logging Volt/Ampmeter
Todo List
File conversion.c
Future improvements:
  • Check/optimize flow in convertValues.
  • Convert negative float values.
  • Add max/min power fields.
File display.c
Future improvements:
  • Change left/right display selection logic so the two update methods can work independently and without finishDisplayUpdates.
  • Check/optimize flow in display updating logic.
  • Add page for setting min/max volt/amp (/watt/time?) values for relay opening functionality.
  • Add status message display functionality on left display/save icon location, stops running & gets removed by any (?) key-press.
File main.c

Things to do in the near future:

  • Check Ah/Wh calculations.
  • Check if the power/Ah/Wh calculations are done using wrong/old measurements.
  • Handle uint32_t wraparound for time between calculations measurements and waiting time.
  • Don't send/do certain functions if one of the meters is powered down.

Long-term future improvements:

  • Add function to stop measurements when the voltage/current is (above/) below a certain value.
  • Add external temperature reading functionality.
  • Add internal temperature reading functionality (MX_ADC1_Init();).
  • Add interrupt-logging functionality.
  • Add relay-opening functionality.
  • Add "manual measurement-mode" to log on up-button press.
  • Add "performance-mode" with no display refreshes.
    • (sub-page on right display, start/stop with up, beeps for confirmation)
  • Add low-battery beeping.
  • Add buzzer functionality using TIM2 (MX_TIM2_Init();).
    • (short beep button-press, longer when measurement taken, add ON/OFF settings page)
  • Optimize encoder logic so there is less copy-pasting.
  • Add debounce logic to getSW0();, getSW1(); and getENCkey();.
  • Use LL_GetTick(); instead of HAL_GetTick();?
  • Add circular pages for setting day/month/hour/minute/second (changeDateTime).
  • Add day-checking in function of the month?
  • Use defines for circular pages?
  • Start using aBY56W_ContinuousRead? Send on every meter power-up?
  • Only one while-loop (USART_HandleContinuousReception) when one meter is connected, way more if both are? Optimize this?
  • Add overflow catch if data.voltage/current are negative values?
    • data.power > 999.999, data.ah > 9999.999, data.wh > 9999.999
  • Remove all Segger-RTT functionality?
  • Store settings in power-down-safe memory.
File rtc.c
Future improvements:
File usart.c
Future improvements:
  • Add overflow catch if data.voltage/current are negative values?
    • data.current > 9.9999, data.voltage > 99.999 (these checks are as of v1.1 of this file unnecessary...)
  • Increase baudrate for USART2/3 communication?
  • Add separate USART1 handler? (USART_HandleContinuousReception();)
  • Check if we really did receive the openLog startup-message 12<.