mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2026-05-18 05:09:20 +02:00
Feature: Support for second Victron MPPT charge controller
this change adds support for a second Victron MPPT charge controller using a second serial connection. * Add device configuration for a second victron mppt * Update VedirectView for second victron mppt * Update MqttHandleVedirect for second victron mppt * Update MqttHandleVedirectHass for second victron mppt * Handle nonexisting victron controllers with optionals * Add bool-function to Battery and inherited classes, if uart port 2 is being used * Introduced a serial port manager. In order to prevent the battery and the Victron MPPT to use the same hw serial ports, this class keeps track of the used ports and their owners.
This commit is contained in:
committed by
Bernhard Kirchen
parent
21c19f4b7f
commit
75541be248
@@ -1,9 +1,9 @@
|
||||
#include <Arduino.h>
|
||||
#include "VeDirectMpptController.h"
|
||||
|
||||
void VeDirectMpptController::init(int8_t rx, int8_t tx, Print* msgOut, bool verboseLogging)
|
||||
void VeDirectMpptController::init(int8_t rx, int8_t tx, Print* msgOut, bool verboseLogging, uint16_t hwSerialPort)
|
||||
{
|
||||
VeDirectFrameHandler::init(rx, tx, msgOut, verboseLogging, 1);
|
||||
VeDirectFrameHandler::init(rx, tx, msgOut, verboseLogging, hwSerialPort);
|
||||
_spData = std::make_shared<veMpptStruct>();
|
||||
if (_verboseLogging) { _msgOut->println("Finished init MPPTController"); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user