Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion applications/pionix_chargebridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ add_executable(pionix_chargebridge
src/everest_api/api_connector.cpp
src/everest_api/evse_bsp_api.cpp
src/everest_api/ovm_api.cpp
src/everest_api/ev_bsp_api.cpp

src/firmware_update/sync_fw_updater.cpp

Expand All @@ -25,7 +26,7 @@ add_executable(pionix_chargebridge

src/can_bridge.cpp
src/charge_bridge.cpp
src/evse_bridge.cpp
src/bsp_bridge.cpp
src/gpio_bridge.cpp
src/heartbeat_service.cpp
src/plc_bridge.cpp
Expand Down Expand Up @@ -62,3 +63,5 @@ install (TARGETS pionix_chargebridge)
install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/${cb_firmware_binary}" DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/chargebridge/firmware)
install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/config/config-CB-EVAL.yaml" DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/chargebridge RENAME "config-CB-EVAL.yaml-example")
install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/config/config-CB-SAT-AC.yaml" DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/chargebridge RENAME "config-CB-SAT-AC.yaml-example")
install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/config/config-CB-EVAL-EV.yaml" DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/chargebridge RENAME "config-CB-EVAL-EV.yaml-example")
install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/config/config-CB-EVAL-SIM.yaml" DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/chargebridge RENAME "config-CB-EVAL-SIM.yaml-example")
154 changes: 154 additions & 0 deletions applications/pionix_chargebridge/config/config-CB-EVAL-EV.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
charge_bridge:
name: cb_eval_ev
ip: 10.10.10.43
#ip: chargebridge-44b7d0c99629.local
fw_file: ./firmware/charge-bridge-fw_complete.cbfw
fw_update_on_start: true
mdns_name: ""

heartbeat:
interval_s: 1
connection_to_s: 10

safety:
pp_mode: "disabled"
cp_avg_ms: 10
inverted_emergency_input: 0
relay_1:
relay_mode: "PowerRelay"
feedback_enabled: false
feedback_delay_ms: 200
feedback_inverted: true
# PWM not supported yet
pwm_dc: 100
pwm_delay_ms: 0
switchoff_delay_ms: 10
relay_2:
relay_mode: "PowerRelay"
feedback_enabled: false
feedback_delay_ms: 200
feedback_inverted: true
pwm_dc: 100
pwm_delay_ms: 0
switchoff_delay_ms: 10
relay_3:
relay_mode: "UserRelay"
feedback_enabled: false
feedback_delay_ms: 10
feedback_inverted: false
pwm_dc: 100
pwm_delay_ms: 0
switchoff_delay_ms: 10

can_0:
enable: true
local: "cb_ev_can"
baudrate: 125000

serial_1:
enable: true
local: "/dev/cb_ev_uart"
baudrate: 115200
stopbits: OneStopBit
parity: None

serial_2:
enable: true
local: "/dev/cb_ev_rs485"
baudrate: 19200
stopbits: OneStopBit
parity: Even

plc:
enable: true
tap: "cb_ev_plc"
ip: 172.25.6.1
netmask: 255.255.255.0
mtu: 1518
powersaving_mode: 1

ev_bsp:
enable: true
module_id: "ev_bsp_1"
mqtt_remote: 127.0.0.1
mqtt_port: 1883
mqtt_bind: 127.0.0.1
ovm_enabled: false
ovm_module_id: "ovm_1"

evse_bsp:
enable: false
module_id: "bsp_1"
mqtt_remote: 127.0.0.1
mqtt_port: 1883
mqtt_bind: 127.0.0.1
capabilities:
max_current_A_import: 16
min_current_A_import: 6
max_phase_count_import: 3
min_phase_count_import: 3
max_current_A_export: 16
min_current_A_export: 6
max_phase_count_export: 3
min_phase_count_export: 3
supports_changing_phases_during_charging: false
connector_type: "IEC62196Type2Cable"
max_plug_temperature_C: 250
ovm_enabled: true
ovm_module_id: "ovm_1"

gpio:
enable: true
interval_s: 1
mqtt_remote: "localhost"
mqtt_port: 1883
mqtt_ping_interval_ms: 5000
gpio_0:
mode: "Input"
pulls: "PullUp"
mdns: false
config: 32767
gpio_1:
mode: "Input"
pulls: "NoPull"
config: 32767
gpio_2:
mode: "Input"
pulls: "PullUp"
mdns: false
config: 32767
gpio_3:
mode: "Input"
pulls: "PullUp"
mdns: false
config: 32767
gpio_4:
mode: "Output"
pulls: "PullUp"
mdns: false
config: 1000
gpio_5:
mode: "Output"
pulls: "PullUp"
mdns: false
config: 32767
gpio_6:
mode: "Output"
pulls: "PullUp"
mdns: false
config: 32767
gpio_7:
mode: "Output"
pulls: "PullUp"
mdns: false
config: 32767
gpio_8:
mode: "Output"
pulls: "PullUp"
mdns: false
config: 32767
gpio_9:
mode: "Input"
pulls: "PullUp"
mdns: false
config: 32767
153 changes: 153 additions & 0 deletions applications/pionix_chargebridge/config/config-CB-EVAL-SIM.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
charge_bridge:
name: cb_eval
ip: 10.10.10.20
#ip: chargebridge-44b7d0c99629.local
fw_file: ./firmware/charge-bridge-fw_complete.cbfw
fw_update_on_start: true
mdns_name: ""

heartbeat:
interval_s: 1
connection_to_s: 10

safety:
pp_mode: "disabled"
cp_avg_ms: 10
inverted_emergency_input: 0
relay_1:
relay_mode: "PowerRelay"
feedback_enabled: false
feedback_delay_ms: 200
feedback_inverted: true
# PWM not supported yet
pwm_dc: 100
pwm_delay_ms: 0
switchoff_delay_ms: 10
relay_2:
relay_mode: "PowerRelay"
feedback_enabled: false
feedback_delay_ms: 200
feedback_inverted: true
pwm_dc: 100
pwm_delay_ms: 0
switchoff_delay_ms: 10
relay_3:
relay_mode: "PowerRelay"
feedback_enabled: false
feedback_delay_ms: 10
feedback_inverted: true
pwm_dc: 100
pwm_delay_ms: 0
switchoff_delay_ms: 10

can_0:
enable: true
local: "cb_can"
baudrate: 125000

serial_1:
enable: true
local: "/dev/cb_uart"
baudrate: 115200
stopbits: OneStopBit
parity: None

serial_2:
enable: true
local: "/dev/cb_rs485"
baudrate: 19200
stopbits: OneStopBit
parity: Even

plc:
enable: true
tap: "cb_plc"
ip: 172.25.6.1
netmask: 255.255.255.0
mtu: 1518
powersaving_mode: 1

ev_bsp:
enable: false
module_id: "ev_bsp_1"
mqtt_remote: 127.0.0.1
mqtt_port: 1883
mqtt_bind: 127.0.0.1
ovm_enabled: false
ovm_module_id: "ovm_1"

evse_bsp:
enable: true
module_id: "cb_bsp"
mqtt_remote: "localhost"
mqtt_port: 1883
mqtt_ping_interval_ms: 5000
ovm_enabled: true
ovm_module_id: "cb_ovm"
capabilities:
max_current_A_import: 16
min_current_A_import: 0
max_phase_count_import: 3
min_phase_count_import: 3
max_current_A_export: 16
min_current_A_export: 0
max_phase_count_export: 3
min_phase_count_export: 3
supports_changing_phases_during_charging: false
connector_type: "IEC62196Type2Cable"

gpio:
enable: true
interval_s: 1
mqtt_remote: "localhost"
mqtt_port: 1883
mqtt_ping_interval_ms: 5000
gpio_0:
mode: "Input"
pulls: "PullUp"
mdns: false
config: 32767
gpio_1:
mode: "Input"
pulls: "NoPull"
config: 32767
gpio_2:
mode: "Input"
pulls: "PullUp"
mdns: false
config: 32767
gpio_3:
mode: "Input"
pulls: "PullUp"
mdns: false
config: 32767
gpio_4:
mode: "Output"
pulls: "PullUp"
mdns: false
config: 1000
gpio_5:
mode: "Output"
pulls: "PullUp"
mdns: false
config: 32767
gpio_6:
mode: "Output"
pulls: "PullUp"
mdns: false
config: 32767
gpio_7:
mode: "Output"
pulls: "PullUp"
mdns: false
config: 32767
gpio_8:
mode: "Output"
pulls: "PullUp"
mdns: false
config: 32767
gpio_9:
mode: "Input"
pulls: "PullUp"
mdns: false
config: 32767
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@

namespace charge_bridge {

struct evse_bridge_config {
struct bsp_bridge_config {
std::string cb;
std::string item;
std::uint16_t cb_port;
std::string cb_remote;
evse_bsp::everest_api_config api;
};

class evse_bridge : public everest::lib::io::event::fd_event_register_interface {
class bsp_bridge : public everest::lib::io::event::fd_event_register_interface {
public:
evse_bridge(evse_bridge_config const& config);
~evse_bridge() = default;
bsp_bridge(bsp_bridge_config const& config);

Check warning on line 22 in applications/pionix_chargebridge/include/charge_bridge/bsp_bridge.hpp

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

applications/pionix_chargebridge/include/charge_bridge/bsp_bridge.hpp#L22

Class 'bsp_bridge' has a constructor with 1 argument that is not explicit.
~bsp_bridge() = default;

bool register_events(everest::lib::io::event::fd_event_handler& handler) override;
bool unregister_events(everest::lib::io::event::fd_event_handler& handler) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#pragma once

#include <atomic>
#include <charge_bridge/bsp_bridge.hpp>

Check warning on line 6 in applications/pionix_chargebridge/include/charge_bridge/charge_bridge.hpp

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

applications/pionix_chargebridge/include/charge_bridge/charge_bridge.hpp#L6

Include file: <charge_bridge/bsp_bridge.hpp> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <charge_bridge/can_bridge.hpp>
#include <charge_bridge/evse_bridge.hpp>
#include <charge_bridge/firmware_update/sync_fw_updater.hpp>
#include <charge_bridge/gpio_bridge.hpp>
#include <charge_bridge/heartbeat_service.hpp>
Expand All @@ -30,7 +30,7 @@
std::optional<serial_bridge_config> serial2;
std::optional<serial_bridge_config> serial3;
std::optional<plc_bridge_config> plc;
std::optional<evse_bridge_config> evse;
std::optional<bsp_bridge_config> bsp;
std::optional<heartbeat_config> heartbeat;
std::optional<gpio_config> gpio;
firmware_update::fw_update_config firmware;
Expand Down Expand Up @@ -61,7 +61,7 @@
std::unique_ptr<serial_bridge> m_pty_1;
std::unique_ptr<serial_bridge> m_pty_2;
std::unique_ptr<serial_bridge> m_pty_3;
std::unique_ptr<evse_bridge> m_bsp;
std::unique_ptr<bsp_bridge> m_bsp;
std::unique_ptr<plc_bridge> m_plc;
std::unique_ptr<heartbeat_service> m_heartbeat;
std::unique_ptr<gpio_bridge> m_gpio;
Expand Down
Loading
Loading