Add console writer for commands
This commit is contained in:
parent
69b4d25e62
commit
5c2f3497db
1 changed files with 13 additions and 1 deletions
|
@ -174,7 +174,7 @@ void OvmsVehicleRenaultZoePh2CAN::IncomingFrameCan2(CAN_frame_t* p_frame) {
|
|||
* Handles incoming CAN-frames on bus 3, connected to V1-CAN
|
||||
*/
|
||||
void OvmsVehicleRenaultZoePh2CAN::IncomingFrameCan3(CAN_frame_t* p_frame) {
|
||||
uint8_t *data = p_frame->data.u8;
|
||||
//uint8_t *data = p_frame->data.u8;
|
||||
//ESP_LOGI(TAG, "V1-CAN: PID:%x DATA: %02x %02x %02x %02x %02x %02x %02x %02x", p_frame->MsgID, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]);
|
||||
//tooooooo many packets, OVMS will crash with logging
|
||||
|
||||
|
@ -398,6 +398,18 @@ void OvmsVehicleRenaultZoePh2CAN::Ticker1(uint32_t ticker) {
|
|||
|
||||
}
|
||||
|
||||
OvmsVehicleRenaultZoePh2CAN* OvmsVehicleRenaultZoePh2CAN::GetInstance(OvmsWriter* writer /*=NULL*/)
|
||||
{
|
||||
OvmsVehicleRenaultZoePh2CAN* zoe_ph2_can = (OvmsVehicleRenaultZoePh2CAN*) MyVehicleFactory.ActiveVehicle();
|
||||
string type = StdMetrics.ms_v_type->AsString();
|
||||
if (!zoe_ph2_can || type != "RZ2C") {
|
||||
if (writer)
|
||||
writer->puts("Error: Renault Zoe Ph2 (CAN) vehicle module not selected");
|
||||
return NULL;
|
||||
}
|
||||
return zoe_ph2_can;
|
||||
}
|
||||
|
||||
class OvmsVehicleRenaultZoePh2CANInit {
|
||||
public: OvmsVehicleRenaultZoePh2CANInit();
|
||||
} MyOvmsVehicleRenaultZoePh2CANInit __attribute__ ((init_priority (9000)));
|
||||
|
|
Loading…
Reference in a new issue