Driveline screen: drop turbine tile, show output shaft as provisional rpm
Turbine speed removed from the display - it's an engagement diagnostic, not a driver number, and the Launch now gives output speed directly so it's no longer needed for the ratio-calibration method either. Still decoded in the driver. Its screen slot now shows accelerator pedal %. Output shaft now displays approximate rpm instead of raw counts, via a PROVISIONAL factor from the single Launch reference (128 rpm / 1192 raw = ~0.107, through a known zero). The tile is labelled "OUTPUT (~rpm)" - the "~" keeps an unlocked scaling from reading as exact. Replace the factor once a multi-point Launch sweep gives a real fit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,7 @@ static lv_obj_t* g_gearbox_lbl = NULL;
|
||||
static lv_obj_t* g_rpm_bar = NULL;
|
||||
static lv_obj_t* g_rpm_lbl = NULL;
|
||||
static lv_obj_t* g_torque_lbl = NULL;
|
||||
static lv_obj_t* g_turbine_lbl = NULL;
|
||||
static lv_obj_t* g_pedal_lbl = NULL;
|
||||
static lv_obj_t* g_shaft_lbl = NULL;
|
||||
static lv_obj_t* g_ign_chip = NULL;
|
||||
static lv_obj_t* g_eng_chip = NULL;
|
||||
@@ -211,14 +211,16 @@ static void build() {
|
||||
lv_obj_set_style_text_color(g_rpm_lbl, COL_TEXT, 0);
|
||||
lv_obj_align(g_rpm_lbl, LV_ALIGN_CENTER, 330, 108);
|
||||
|
||||
// ---- bottom row: torque -> turbine -> output (engine to output shaft) --
|
||||
// ---- bottom row: torque | pedal | output shaft -----------------------
|
||||
// Turbine speed is intentionally NOT shown: it's a diagnostic (engagement
|
||||
// proof), not a driver number. Still decoded in the driver.
|
||||
g_torque_lbl = makeStat(g_screen, "TORQUE (Nm)", &lv_font_montserrat_30,
|
||||
LV_ALIGN_BOTTOM_MID, -340, -34);
|
||||
g_turbine_lbl = makeStat(g_screen, "TURBINE (rpm)", &lv_font_montserrat_30,
|
||||
g_pedal_lbl = makeStat(g_screen, "PEDAL (%)", &lv_font_montserrat_30,
|
||||
LV_ALIGN_BOTTOM_MID, 0, -34);
|
||||
// "raw" is not decoration: the output-shaft scaling is still unverified, so
|
||||
// we deliberately show counts rather than invent a unit.
|
||||
g_shaft_lbl = makeStat(g_screen, "OUTPUT SHAFT (raw)", &lv_font_montserrat_30,
|
||||
// Output shaft in rpm via a PROVISIONAL factor (one Launch point). The label
|
||||
// carries "~" so the screen doesn't present an unlocked scaling as exact.
|
||||
g_shaft_lbl = makeStat(g_screen, "OUTPUT (~rpm)", &lv_font_montserrat_30,
|
||||
LV_ALIGN_BOTTOM_MID, 340, -34);
|
||||
|
||||
lv_obj_t* hint = lv_label_create(g_screen);
|
||||
@@ -292,7 +294,7 @@ void tick() {
|
||||
lv_label_set_text(g_gearbox_lbl, "--");
|
||||
lv_label_set_text(g_rpm_lbl, "----");
|
||||
lv_label_set_text(g_torque_lbl, "--");
|
||||
lv_label_set_text(g_turbine_lbl, "--");
|
||||
lv_label_set_text(g_pedal_lbl, "--");
|
||||
lv_label_set_text(g_shaft_lbl, "--");
|
||||
lv_bar_set_value(g_rpm_bar, 0, LV_ANIM_OFF);
|
||||
setChip(g_ign_chip, "IGN --", COL_MUTED);
|
||||
@@ -331,10 +333,11 @@ void tick() {
|
||||
snprintf(buf, sizeof(buf), "%d.%d", dl.engine_torque_x10 / 10, abs(dl.engine_torque_x10 % 10));
|
||||
lv_label_set_text(g_torque_lbl, buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%u", dl.turbine_rpm);
|
||||
lv_label_set_text(g_turbine_lbl, buf);
|
||||
snprintf(buf, sizeof(buf), "%u", dl.pedal_percent);
|
||||
lv_label_set_text(g_pedal_lbl, buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%u", dl.output_shaft_raw);
|
||||
// Provisional rpm from the single-point Launch factor (see automotive_data.h).
|
||||
snprintf(buf, sizeof(buf), "%u", can_output_shaft_rpm(dl.output_shaft_raw));
|
||||
lv_label_set_text(g_shaft_lbl, buf);
|
||||
|
||||
// ---- status chips ----------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user