19 Commits
Author SHA1 Message Date
Martin Jaeger 53ae6d4608 File headers shortened using SPDX-License-Identifier 2019-12-20 11:40:10 +01:00
Martin Jaeger 3f89943edf ThingSet interfaces merged with Ext interfaces 2019-12-20 10:43:51 +01:00
Martin Jaeger 62f2f1978c UEXT and ThingSet code moved to ext folder 2019-12-20 10:38:31 +01:00
Martin Jaeger 74b765e801 Trailing white spaces removed 2019-11-21 07:44:15 +01:00
Martin Jaeger 22f9138a15 LogData renamed to DeviceStatus / dev_stat
Rationale: Logging is used for historic data, but error flags are instantaneous data. Device status
is more generic and now contains also the internal temperature measurement.
2019-11-01 09:54:01 +01:00
Martin Jaeger 68ae3227cc Discharge and load output control improvements
- Charge/discharge control in charger class sets global error flags
- Load state machine analyzes error flags to distinguish reasons for switching load off
- Temperature errors now identified correctly (issue #59)
- Delay before load re-connect after low voltage or overcurrent event now configurable
- Unit tests added
2019-10-24 16:04:32 +02:00
Martin Jaeger f879dc9c5d DC bus integrated into PowerPort class
Reason: Previous idea with storing the voltage only once and not in every port
doesn't work well for droop settings, e.g. the DC/DC output port doesn't know
the actual battery current, which should be used to calculate the droop caued
by wire resistance.
2019-10-22 18:23:19 +02:00
Martin Jaeger a89ac7ff4b Fixing not working references to bat/solar ports in data_objects 2019-10-21 18:00:27 +02:00
Martin Jaeger 8558cef9cb PWM switch also implemented as class 2019-10-20 22:01:45 +02:00
Martin Jaeger b5c7f396e1 PowerPort configuration for different charger types improved
- Solar and battery ports now defined as references to actual hardware ports at very beginning of main.cpp, allowing to use the references also in data_objects.cpp
- Different charger types (PWM / MPPT) are configured more clearly by switching on/off features (DC/DC, PWM switch and load) in PCB configuration
2019-10-20 17:44:32 +02:00
Martin Jaeger 0399c4e877 PowerPort added to store current independent from DC bus type
The DC bus type caused issues because current limits could not be defined individually for each
connection to a junction, as described in issue #50.

With this commit, also some structs were converted to C++ classes to improve readibility of the
code and make sure that pointers (e.g. to PowerPort objects) are always assigned during
initialization.
2019-10-20 14:52:35 +02:00
Martin Jaeger 6c3885e5d0 Log unit-tests added 2019-10-16 21:32:35 +02:00
Martin Jaeger e7317ae1d8 DC bus and terminal naming improved
- DcBus representing actual screw terminals renamed
- Internal DC bus at DC/DC low voltage side added for correct DC/DC control
- DC/DC struct now stores pointers to HV and LV bus objects. Redundant voltage and current measurement variables removed.
- Unit tests updated

DC/DC control needs further improvements to make use of the changes
2019-10-15 13:57:23 +02:00
Martin Jaeger cb206b6864 DC/DC startup check reworked and unit-tests added 2019-10-15 13:54:05 +02:00
hogthrob 6d56003c8c Unified half bridge timer handling (#53)
* As much as possible code is shared between both timer abstractions.
* Unit tests added to main implementation file (stub removed)
2019-10-15 10:34:53 +02:00
Martin Jaeger c968a6bb8a Structs renamed for new coding style (closes #42) 2019-08-08 10:16:16 +02:00
Martin Jaeger dec36143dd 12V/24V detection added and bat_charger restructured 2019-05-23 22:16:41 +02:00
Martin Jaeger 7c75548193 DC bus type introduced and unit tests added 2019-05-07 18:56:04 +02:00
Martin Jaeger d9f7103e97 Starting test-driven development (TDD) with Unity
- Using PlatformIO's embedded unit testing with native environment
- mbed-dependent .cpp files escaped with #ifndef UNIT_TEST
- First tests for charger module added under test/ directory
2019-05-04 11:31:37 +02:00