forked from tbnobody/OpenDTU
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New class for Victron Chargers and first support for sending VE.Direc…
…t hex commands cleanup
- Loading branch information
1 parent
7fb26e1
commit bd4744a
Showing
5 changed files
with
164 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <Arduino.h> | ||
#include "VeDirectChargerController.h" | ||
|
||
/* | ||
* setBatteryCurrentLimit | ||
* This function sets battery current limit. Don't call it in a loop because | ||
* Victron is writing battery current limit in non volatile memory. | ||
*/ | ||
void VeDirectChargerController::setBatteryCurrentLimit(uint16_t batteryCurrentLimit) | ||
{ | ||
//uint16_t veBatCurrentLimit = batteryCurrentLimit * 10; | ||
sendHexCommand(SET,BATTERY_MAXIMUM_CURRENT,DEFAULT_FLAG0, batteryCurrentLimit * 10); | ||
_msgOut->printf("[Victron Charger] Set Victron batteryMaximumCurrent to %dA.\r\n",batteryCurrentLimit); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
|
||
#include <Arduino.h> | ||
#include "VeDirectFrameHandler.h" | ||
|
||
class VeDirectChargerController : public VeDirectFrameHandler { | ||
public: | ||
void setBatteryCurrentLimit(uint16_t batteryCurrentLimit); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters