arduino-libraries / Arduino_MachineControl

GNU Lesser General Public License v2.1
38 stars 29 forks source link

Update PCF8563T.cpp #87

Closed MrHyrex closed 2 years ago

MrHyrex commented 2 years ago

fix bug in getDays() method.

Sometimes the getDays() function returns a value higher than 31. The value is typically 40 days too high and this happens whenever the getSeconds() returns a value higher than 40.

Eg. at 16:40:30 on the 1st of june getDays() returns 1, then 15 seconds later at 16:40:45 getDays() returns 41, and then 20 seconds later at 16:41:05 it returns 1 again.

Unlike the other get-functions in the PCF8563TClass the getDays() function does not filter out the 2 unused MSBs of the day register as it should according to the datasheet. This pr fixes that

github-actions[bot] commented 2 years ago

Memory usage change @ 2d7d34f710295730c94f81bb5dd078862fb2640c

Board flash % RAM for global variables %
arduino:mbed_portenta:envie_m7 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table Board|examples/Analog_Out
flash|%|examples/Analog_Out
RAM for global variables|%|examples/Analog_input/Analog_input_0_10V
flash|%|examples/Analog_input/Analog_input_0_10V
RAM for global variables|%|examples/Analog_input/Analog_input_4_20mA
flash|%|examples/Analog_input/Analog_input_4_20mA
RAM for global variables|%|examples/Analog_input/Analog_input_NTC
flash|%|examples/Analog_input/Analog_input_NTC
RAM for global variables|%|examples/CAN/ReadCan
flash|%|examples/CAN/ReadCan
RAM for global variables|%|examples/CAN/WriteCan
flash|%|examples/CAN/WriteCan
RAM for global variables|%|examples/Digital_output
flash|%|examples/Digital_output
RAM for global variables|%|examples/Digital_programmable/CombinedIOExpander
flash|%|examples/Digital_programmable/CombinedIOExpander
RAM for global variables|%|examples/Digital_programmable/Digital_input
flash|%|examples/Digital_programmable/Digital_input
RAM for global variables|%|examples/Digital_programmable/GPIO_programmable
flash|%|examples/Digital_programmable/GPIO_programmable
RAM for global variables|%|examples/Encoders
flash|%|examples/Encoders
RAM for global variables|%|examples/Ethernet
flash|%|examples/Ethernet
RAM for global variables|%|examples/RS232
flash|%|examples/RS232
RAM for global variables|%|examples/RS485_fullduplex
flash|%|examples/RS485_fullduplex
RAM for global variables|%|examples/RS485_halfduplex
flash|%|examples/RS485_halfduplex
RAM for global variables|%|examples/RTC
flash|%|examples/RTC
RAM for global variables|%|examples/RTC_Alarm
flash|%|examples/RTC_Alarm
RAM for global variables|%|examples/Temp_probes_RTD
flash|%|examples/Temp_probes_RTD
RAM for global variables|%|examples/Temp_probes_Thermocouples
flash|%|examples/Temp_probes_Thermocouples
RAM for global variables|%|examples/USB_host
flash|%|examples/USB_host
RAM for global variables|% -|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|- arduino:mbed_portenta:envie_m7|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0
Click for full report CSV ``` Board,examples/Analog_Out
flash,%,examples/Analog_Out
RAM for global variables,%,examples/Analog_input/Analog_input_0_10V
flash,%,examples/Analog_input/Analog_input_0_10V
RAM for global variables,%,examples/Analog_input/Analog_input_4_20mA
flash,%,examples/Analog_input/Analog_input_4_20mA
RAM for global variables,%,examples/Analog_input/Analog_input_NTC
flash,%,examples/Analog_input/Analog_input_NTC
RAM for global variables,%,examples/CAN/ReadCan
flash,%,examples/CAN/ReadCan
RAM for global variables,%,examples/CAN/WriteCan
flash,%,examples/CAN/WriteCan
RAM for global variables,%,examples/Digital_output
flash,%,examples/Digital_output
RAM for global variables,%,examples/Digital_programmable/CombinedIOExpander
flash,%,examples/Digital_programmable/CombinedIOExpander
RAM for global variables,%,examples/Digital_programmable/Digital_input
flash,%,examples/Digital_programmable/Digital_input
RAM for global variables,%,examples/Digital_programmable/GPIO_programmable
flash,%,examples/Digital_programmable/GPIO_programmable
RAM for global variables,%,examples/Encoders
flash,%,examples/Encoders
RAM for global variables,%,examples/Ethernet
flash,%,examples/Ethernet
RAM for global variables,%,examples/RS232
flash,%,examples/RS232
RAM for global variables,%,examples/RS485_fullduplex
flash,%,examples/RS485_fullduplex
RAM for global variables,%,examples/RS485_halfduplex
flash,%,examples/RS485_halfduplex
RAM for global variables,%,examples/RTC
flash,%,examples/RTC
RAM for global variables,%,examples/RTC_Alarm
flash,%,examples/RTC_Alarm
RAM for global variables,%,examples/Temp_probes_RTD
flash,%,examples/Temp_probes_RTD
RAM for global variables,%,examples/Temp_probes_Thermocouples
flash,%,examples/Temp_probes_Thermocouples
RAM for global variables,%,examples/USB_host
flash,%,examples/USB_host
RAM for global variables,% arduino:mbed_portenta:envie_m7,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0 ```