Expand serial status field names
This commit is contained in:
+29
-29
@@ -583,26 +583,26 @@ void printStatus(const __FlashStringHelper *tag) {
|
|||||||
Serial.print(tag);
|
Serial.print(tag);
|
||||||
Serial.println(F("]"));
|
Serial.println(F("]"));
|
||||||
printUptime();
|
printUptime();
|
||||||
printNamedInt(F("raw"), parkingRawValue);
|
printNamedInt(F("parkingRawValue"), parkingRawValue);
|
||||||
printNamedBool(F("ig"), ignitionState == HIGH);
|
printNamedBool(F("ignition"), ignitionState == HIGH);
|
||||||
printNamedBool(F("p"), parkingState == HIGH);
|
printNamedBool(F("parking"), parkingState == HIGH);
|
||||||
printNamedBool(F("rawDrive"), getRawDriveMode() == HIGH);
|
printNamedBool(F("rawDriveMode"), getRawDriveMode() == HIGH);
|
||||||
printNamedBool(F("confirmedDrive"), confirmedDriveMode == HIGH);
|
printNamedBool(F("confirmedDriveMode"), confirmedDriveMode == HIGH);
|
||||||
printNamedLong(F("currentMs"), currentPosMs);
|
printNamedLong(F("currentPositionMs"), currentPosMs);
|
||||||
printNamedLong(F("targetMs"), targetPosMs);
|
printNamedLong(F("targetPositionMs"), targetPosMs);
|
||||||
printNamedInt(F("savedPositionMs"), storedSeatPositionMs);
|
printNamedInt(F("savedPositionMs"), storedSeatPositionMs);
|
||||||
printNamedInt(F("hardLimitMs"), SEAT_HARD_LIMIT_UP_MS);
|
printNamedInt(F("hardLimitPositionMs"), SEAT_HARD_LIMIT_UP_MS);
|
||||||
printNamedInt(F("requestedRelay"), requestedSeatAction);
|
printNamedInt(F("requestedRelayAction"), requestedSeatAction);
|
||||||
printNamedInt(F("actualRelay"), currentSeatAction);
|
printNamedInt(F("actualRelayAction"), currentSeatAction);
|
||||||
printNamedBool(F("manualMode"), manualMode);
|
printNamedBool(F("manualMode"), manualMode);
|
||||||
printNamedBool(F("stabilizing"), isStabilizing);
|
printNamedBool(F("stabilizing"), isStabilizing);
|
||||||
Serial.print(F("useCount="));
|
Serial.print(F("useCount="));
|
||||||
Serial.print(useCount);
|
Serial.print(useCount);
|
||||||
Serial.print(F("/"));
|
Serial.print(F("/"));
|
||||||
Serial.println(USES_BEFORE_AUTO_CALIBRATION);
|
Serial.println(USES_BEFORE_AUTO_CALIBRATION);
|
||||||
printNamedBool(F("autoPending"), autoCalibrationPending);
|
printNamedBool(F("autoCalibrationPending"), autoCalibrationPending);
|
||||||
printNamedBool(F("forceCal"), forceCalibration);
|
printNamedBool(F("forceCalibration"), forceCalibration);
|
||||||
printNamedInt(F("autoCalState"), autoCalibrationState);
|
printNamedInt(F("autoCalibrationState"), autoCalibrationState);
|
||||||
printAutoCalibrationDelayStatus();
|
printAutoCalibrationDelayStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -610,26 +610,26 @@ void printDebugLine() {
|
|||||||
Serial.println();
|
Serial.println();
|
||||||
Serial.println(F("[DEBUG]"));
|
Serial.println(F("[DEBUG]"));
|
||||||
printUptime();
|
printUptime();
|
||||||
printNamedInt(F("raw"), parkingRawValue);
|
printNamedInt(F("parkingRawValue"), parkingRawValue);
|
||||||
printNamedBool(F("ig"), ignitionState == HIGH);
|
printNamedBool(F("ignition"), ignitionState == HIGH);
|
||||||
printNamedBool(F("p"), parkingState == HIGH);
|
printNamedBool(F("parking"), parkingState == HIGH);
|
||||||
printNamedBool(F("rawDrive"), getRawDriveMode() == HIGH);
|
printNamedBool(F("rawDriveMode"), getRawDriveMode() == HIGH);
|
||||||
printNamedBool(F("confirmedDrive"), confirmedDriveMode == HIGH);
|
printNamedBool(F("confirmedDriveMode"), confirmedDriveMode == HIGH);
|
||||||
printNamedLong(F("currentMs"), currentPosMs);
|
printNamedLong(F("currentPositionMs"), currentPosMs);
|
||||||
printNamedLong(F("targetMs"), targetPosMs);
|
printNamedLong(F("targetPositionMs"), targetPosMs);
|
||||||
printNamedInt(F("savedMs"), storedSeatPositionMs);
|
printNamedInt(F("savedPositionMs"), storedSeatPositionMs);
|
||||||
printNamedInt(F("hardLimitMs"), SEAT_HARD_LIMIT_UP_MS);
|
printNamedInt(F("hardLimitPositionMs"), SEAT_HARD_LIMIT_UP_MS);
|
||||||
printNamedInt(F("requestedRelay"), requestedSeatAction);
|
printNamedInt(F("requestedRelayAction"), requestedSeatAction);
|
||||||
printNamedInt(F("actualRelay"), currentSeatAction);
|
printNamedInt(F("actualRelayAction"), currentSeatAction);
|
||||||
printNamedBool(F("manual"), manualMode);
|
printNamedBool(F("manualMode"), manualMode);
|
||||||
printNamedBool(F("stabilizing"), isStabilizing);
|
printNamedBool(F("stabilizing"), isStabilizing);
|
||||||
Serial.print(F("useCount="));
|
Serial.print(F("useCount="));
|
||||||
Serial.print(useCount);
|
Serial.print(useCount);
|
||||||
Serial.print(F("/"));
|
Serial.print(F("/"));
|
||||||
Serial.println(USES_BEFORE_AUTO_CALIBRATION);
|
Serial.println(USES_BEFORE_AUTO_CALIBRATION);
|
||||||
printNamedBool(F("autoPending"), autoCalibrationPending);
|
printNamedBool(F("autoCalibrationPending"), autoCalibrationPending);
|
||||||
printNamedBool(F("forceCal"), forceCalibration);
|
printNamedBool(F("forceCalibration"), forceCalibration);
|
||||||
printNamedInt(F("autoCalState"), autoCalibrationState);
|
printNamedInt(F("autoCalibrationState"), autoCalibrationState);
|
||||||
printAutoCalibrationDelayStatus();
|
printAutoCalibrationDelayStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -688,7 +688,7 @@ void printAutoCalibrationDelayStatusInline() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Serial.print(F(" autoCalOffTimer="));
|
Serial.print(F("autoCalibrationOffTimer="));
|
||||||
if (ignitionState == HIGH) {
|
if (ignitionState == HIGH) {
|
||||||
Serial.print(F("waiting_for_ig_off"));
|
Serial.print(F("waiting_for_ig_off"));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ Opening a USB serial connection can reset an Arduino Nano through DTR.
|
|||||||
If the board boots while `IG1 HIGH` and parking is OFF, the controller assumes the seat is already at the saved driving position:
|
If the board boots while `IG1 HIGH` and parking is OFF, the controller assumes the seat is already at the saved driving position:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
currentMs = savedPositionMs
|
currentPositionMs = savedPositionMs
|
||||||
targetMs = savedPositionMs
|
targetPositionMs = savedPositionMs
|
||||||
relay = OFF
|
relay = OFF
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -85,23 +85,23 @@ Every status output uses one item per line and includes boot uptime:
|
|||||||
```text
|
```text
|
||||||
[STATUS]
|
[STATUS]
|
||||||
uptime=0h 2m 13s 457ms
|
uptime=0h 2m 13s 457ms
|
||||||
raw=1023
|
parkingRawValue=1023
|
||||||
ig=true
|
ignition=true
|
||||||
p=true
|
parking=true
|
||||||
rawDrive=false
|
rawDriveMode=false
|
||||||
confirmedDrive=false
|
confirmedDriveMode=false
|
||||||
```
|
```
|
||||||
|
|
||||||
If the use counter reached 10, status/debug output also includes the ignition-off calibration timer:
|
If the use counter reached 10, status/debug output also includes the ignition-off calibration timer:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
autoCalOffTimer=elapsed 0h 1m 20s 123ms remaining 0h 3m 39s 877ms
|
autoCalibrationOffTimer=elapsed 0h 1m 20s 123ms remaining 0h 3m 39s 877ms
|
||||||
```
|
```
|
||||||
|
|
||||||
If IG1 is still ON:
|
If IG1 is still ON:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
autoCalOffTimer=waiting_for_ig_off
|
autoCalibrationOffTimer=waiting_for_ig_off
|
||||||
```
|
```
|
||||||
|
|
||||||
Debug mode prints a readable block every second, one item per line. Boolean values are printed as `true` or `false`:
|
Debug mode prints a readable block every second, one item per line. Boolean values are printed as `true` or `false`:
|
||||||
@@ -109,22 +109,23 @@ Debug mode prints a readable block every second, one item per line. Boolean valu
|
|||||||
```text
|
```text
|
||||||
[DEBUG]
|
[DEBUG]
|
||||||
uptime=0h 0m 5s 123ms
|
uptime=0h 0m 5s 123ms
|
||||||
raw=1023
|
parkingRawValue=1023
|
||||||
ig=true
|
ignition=true
|
||||||
p=true
|
parking=true
|
||||||
rawDrive=false
|
rawDriveMode=false
|
||||||
confirmedDrive=false
|
confirmedDriveMode=false
|
||||||
currentMs=0
|
currentPositionMs=0
|
||||||
targetMs=0
|
targetPositionMs=0
|
||||||
savedMs=6000
|
savedPositionMs=6000
|
||||||
requestedRelay=0
|
hardLimitPositionMs=6000
|
||||||
actualRelay=0
|
requestedRelayAction=0
|
||||||
manual=false
|
actualRelayAction=0
|
||||||
|
manualMode=false
|
||||||
stabilizing=false
|
stabilizing=false
|
||||||
useCount=0/10
|
useCount=0/10
|
||||||
autoPending=false
|
autoCalibrationPending=false
|
||||||
forceCal=false
|
forceCalibration=false
|
||||||
autoCalState=0
|
autoCalibrationState=0
|
||||||
```
|
```
|
||||||
|
|
||||||
## Automatic Calibration
|
## Automatic Calibration
|
||||||
@@ -136,8 +137,8 @@ autoCalState=0
|
|||||||
```text
|
```text
|
||||||
up 7000ms
|
up 7000ms
|
||||||
down 6000ms
|
down 6000ms
|
||||||
currentMs = 0
|
currentPositionMs = 0
|
||||||
targetMs = 0
|
targetPositionMs = 0
|
||||||
useCount = 0
|
useCount = 0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -225,8 +225,8 @@ when currentPosMs <= 0:
|
|||||||
</table>
|
</table>
|
||||||
<p><span class="warn">주의:</span> 명령은 한 글자만 받습니다. <code>debug</code>, <code>down</code>, <code>position 2000</code>처럼 긴 문자열은 실행하지 않습니다.</p>
|
<p><span class="warn">주의:</span> 명령은 한 글자만 받습니다. <code>debug</code>, <code>down</code>, <code>position 2000</code>처럼 긴 문자열은 실행하지 않습니다.</p>
|
||||||
<p>모든 상태 출력은 항목별 한 줄 형식이며, 부팅 후 경과 시간이 <code>uptime=0h 2m 13s 457ms</code> 형식으로 포함됩니다. debug 출력에서도 1초마다 같은 형식으로 확인할 수 있습니다.</p>
|
<p>모든 상태 출력은 항목별 한 줄 형식이며, 부팅 후 경과 시간이 <code>uptime=0h 2m 13s 457ms</code> 형식으로 포함됩니다. debug 출력에서도 1초마다 같은 형식으로 확인할 수 있습니다.</p>
|
||||||
<p>사용 횟수가 10회에 도달한 경우에만 보정 대기 타이머가 <code>autoCalOffTimer=elapsed 0h 1m 20s 123ms remaining 0h 3m 39s 877ms</code> 형식으로 추가 출력됩니다. IG1 ON 상태에서는 <code>autoCalOffTimer=waiting_for_ig_off</code>로 표시됩니다.</p>
|
<p>사용 횟수가 10회에 도달한 경우에만 보정 대기 타이머가 <code>autoCalibrationOffTimer=elapsed 0h 1m 20s 123ms remaining 0h 3m 39s 877ms</code> 형식으로 추가 출력됩니다. IG1 ON 상태에서는 <code>autoCalibrationOffTimer=waiting_for_ig_off</code>로 표시됩니다.</p>
|
||||||
<p>debug 출력은 1초마다 항목별 한 줄 형식으로 표시되며, <code>ig=true</code>, <code>p=false</code>, <code>autoPending=false</code>처럼 bool 값은 <code>true</code>/<code>false</code>로 출력됩니다.</p>
|
<p>debug 출력은 1초마다 항목별 한 줄 형식으로 표시되며, <code>ignition=true</code>, <code>parking=false</code>, <code>autoCalibrationPending=false</code>처럼 bool 값은 <code>true</code>/<code>false</code>로 출력됩니다.</p>
|
||||||
|
|
||||||
<h2>5. 수동 위치 세팅 시뮬레이션</h2>
|
<h2>5. 수동 위치 세팅 시뮬레이션</h2>
|
||||||
<table>
|
<table>
|
||||||
@@ -300,7 +300,7 @@ if useCount >= 10 and IG1 LOW for 5 minutes:
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>내부 위치값 범위 이탈</td>
|
<td>내부 위치값 범위 이탈</td>
|
||||||
<td><code>currentMs</code>, <code>targetMs</code>를 0..6000으로 보정</td>
|
<td><code>currentPositionMs</code>, <code>targetPositionMs</code>를 0..6000으로 보정</td>
|
||||||
<td>시간 계산 오차나 상태 꼬임으로 인한 비정상 목표 방지</td>
|
<td>시간 계산 오차나 상태 꼬임으로 인한 비정상 목표 방지</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user