forked from tbnobody/OpenDTU
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: add support for Pytes batteries using CAN (tbnobody#1088)
Co-authored-by: Bernhard Kirchen <[email protected]>
- Loading branch information
1 parent
83c59d7
commit 6a3f90f
Showing
13 changed files
with
684 additions
and
16 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#pragma once | ||
|
||
#include "Configuration.h" | ||
#include "Battery.h" | ||
#include "BatteryCanReceiver.h" | ||
#include <driver/twai.h> | ||
|
||
class PytesCanReceiver : public BatteryCanReceiver { | ||
public: | ||
bool init(bool verboseLogging) final; | ||
void onMessage(twai_message_t rx_message) final; | ||
|
||
std::shared_ptr<BatteryStats> getStats() const final { return _stats; } | ||
|
||
private: | ||
std::shared_ptr<PytesBatteryStats> _stats = | ||
std::make_shared<PytesBatteryStats>(); | ||
}; |
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
Oops, something went wrong.
6a3f90f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this Commit / PR is dedicated for OpenDTU-OnBattery ?