@@ -654,6 +654,7 @@ static const char CONFIG_GENERATOR_HTML[] PROGMEM = R"HTML(
654654 const card = document.getElementById(`sensor-${id}`);
655655 const type = card.querySelector('.monitor-type').value;
656656 const numField = card.querySelector('.tank-num-field');
657+ const numFieldLabel = numField.querySelector('span');
657658 const nameLabel = card.querySelector('.name-label');
658659 const heightLabel = card.querySelector('.height-label');
659660 const sensorTypeSelect = card.querySelector('.sensor-type');
@@ -665,15 +666,17 @@ static const char CONFIG_GENERATOR_HTML[] PROGMEM = R"HTML(
665666 heightLabel.textContent = 'Max Pressure';
666667 pulsesPerRevField.style.display = 'none';
667668 } else if (type === 'rpm') {
668- numField.style.display = 'none';
669- nameLabel.textContent = 'System Name';
669+ numField.style.display = 'flex';
670+ numFieldLabel.textContent = 'Engine Number';
671+ nameLabel.textContent = 'Engine Name';
670672 heightLabel.textContent = 'Max RPM';
671673 pulsesPerRevField.style.display = 'flex';
672674 // Auto-select Hall Effect RPM sensor type
673675 sensorTypeSelect.value = '3';
674676 updatePinOptions(id);
675677 } else {
676678 numField.style.display = 'flex';
679+ numFieldLabel.textContent = 'Tank Number';
677680 nameLabel.textContent = 'Tank Name';
678681 heightLabel.textContent = 'Height (in)';
679682 pulsesPerRevField.style.display = 'none';
@@ -739,15 +742,15 @@ static const char CONFIG_GENERATOR_HTML[] PROGMEM = R"HTML(
739742 const type = parseInt(card.querySelector('.sensor-type').value);
740743 const pin = parseInt(card.querySelector('.sensor-pin').value);
741744
742- // For gas and rpm sensors, we hide the number but still need one for the firmware.
743- // We'll use the index + 1.
745+ // For gas and RPM sensors, we still use the number field for the firmware.
746+ // For gas sensors, we use index + 1 as default. For RPM, user can enter engine number .
744747 let tankNum = parseInt(card.querySelector('.tank-num').value) || (index + 1);
745748 let name = card.querySelector('.tank-name').value;
746749
747750 if (monitorType === 'gas') {
748751 if (!name) name = `Gas System ${index + 1}`;
749752 } else if (monitorType === 'rpm') {
750- if (!name) name = `RPM Sensor ${index + 1 }`;
753+ if (!name) name = `Engine ${tankNum }`;
751754 } else {
752755 if (!name) name = `Tank ${index + 1}`;
753756 }
0 commit comments