mirror of https://github.com/FOME-Tech/fome-fw.git
genesis coupe
This commit is contained in:
parent
1bebaea99f
commit
c4c3855739
|
@ -66,6 +66,9 @@
|
||||||
static time_msecs_t mph_timer;
|
static time_msecs_t mph_timer;
|
||||||
static time_msecs_t mph_ctr;
|
static time_msecs_t mph_ctr;
|
||||||
|
|
||||||
|
#define GENESIS_COUPLE_RPM_316 0x316
|
||||||
|
#define GENESIS_COUPLE_COOLANT_329 0x329
|
||||||
|
|
||||||
#define NISSAN_RPM_1F9 0x1F9
|
#define NISSAN_RPM_1F9 0x1F9
|
||||||
// Nissan z33 350Z and else
|
// Nissan z33 350Z and else
|
||||||
// 0x23d = 573
|
// 0x23d = 573
|
||||||
|
@ -96,6 +99,7 @@ void canDashboardW202(CanCycle cycle);
|
||||||
void canDashboardBMWE90(CanCycle cycle);
|
void canDashboardBMWE90(CanCycle cycle);
|
||||||
void canDashboardVagMqb(CanCycle cycle);
|
void canDashboardVagMqb(CanCycle cycle);
|
||||||
void canDashboardNissanVQ(CanCycle cycle);
|
void canDashboardNissanVQ(CanCycle cycle);
|
||||||
|
void canDashboardGenesisCoupe(CanCycle cycle);
|
||||||
|
|
||||||
void updateDash(CanCycle cycle) {
|
void updateDash(CanCycle cycle) {
|
||||||
|
|
||||||
|
@ -125,6 +129,9 @@ void updateDash(CanCycle cycle) {
|
||||||
case CAN_BUS_NISSAN_VQ:
|
case CAN_BUS_NISSAN_VQ:
|
||||||
canDashboardNissanVQ(cycle);
|
canDashboardNissanVQ(cycle);
|
||||||
break;
|
break;
|
||||||
|
case CAN_BUS_GENESIS_COUPE:
|
||||||
|
canDashboardGenesisCoupe(cycle);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -305,6 +312,22 @@ void canDashboardW202(CanCycle cycle) {
|
||||||
|
|
||||||
static int rollingId = 0;
|
static int rollingId = 0;
|
||||||
|
|
||||||
|
void canDashboardGenesisCoupe(CanCycle cycle) {
|
||||||
|
if (cycle.isInterval(CI::_50ms)) {
|
||||||
|
{
|
||||||
|
CanTxMessage msg(GENESIS_COUPLE_RPM_316, 8);
|
||||||
|
int rpm8 = GET_RPM() * 4;
|
||||||
|
msg[3] = rpm8 >> 8;
|
||||||
|
msg[4] = rpm8 & 0xFF;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
CanTxMessage msg(GENESIS_COUPLE_COOLANT_329, 8);
|
||||||
|
int clt = Sensor::get(SensorType::Clt).value_or(0) * 2;
|
||||||
|
msg[1] = clt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void canDashboardNissanVQ(CanCycle cycle) {
|
void canDashboardNissanVQ(CanCycle cycle) {
|
||||||
if (cycle.isInterval(CI::_50ms)) {
|
if (cycle.isInterval(CI::_50ms)) {
|
||||||
{
|
{
|
||||||
|
@ -318,7 +341,7 @@ void canDashboardNissanVQ(CanCycle cycle) {
|
||||||
{
|
{
|
||||||
CanTxMessage msg(NISSAN_CLT_551, 8);
|
CanTxMessage msg(NISSAN_CLT_551, 8);
|
||||||
|
|
||||||
int clt = 40; // todo read sensor
|
int clt = Sensor::get(SensorType::Clt).value_or(0);
|
||||||
msg[0] = clt + 45;
|
msg[0] = clt + 45;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue