1
0
forked from me/IronOS

reorder debug menu . . . (#1380)

* Update DebugMenu.md

* Update make_translation.py

* Update GUIThread.cpp

* Update DebugMenu.md
This commit is contained in:
discip
2022-08-25 01:17:15 +02:00
committed by GitHub
parent 3895218b2d
commit b5323d9c77
3 changed files with 78 additions and 74 deletions

View File

@@ -11,7 +11,11 @@ This menu is meant to be simple, so it has no fancy GUI animations.
Items are shown in the menu on a single line, so they use short codes and appear in this order: Items are shown in the menu on a single line, so they use short codes and appear in this order:
### Time ### ID
- This is used by Irons that have an ID and serial number to help check if the iron is authentic. All Pinecil V1 show the same ID number as this is the number programmed into the MCU.
- The new Pinecil V2 released Aug. 2, 2022 now uses BL706, which enables generating a unique ID/Serial number to every iron. This can be used to verify your Pinecil authenticity [here](https://pinecil.pine64.org/).
### UpTime
This just shows how many deciseconds the unit has been powered for. This just shows how many deciseconds the unit has been powered for.
@@ -20,6 +24,22 @@ This just shows how many deciseconds the unit has been powered for.
This is the last timestamp of movement. When the iron is moved, this should update to match the time field (one before in the menu). This is the last timestamp of movement. When the iron is moved, this should update to match the time field (one before in the menu).
This can be used for checking performance of the movement detection code. This can be used for checking performance of the movement detection code.
### ACC
This indicates the accelerometer that is fitted inside the unit.
- MMA8652
- LIS2DH12
- BMA223
- MSA301
- SC7A20
- None detected -> running in fallback without movement detection
- Scanning -> Still searching I2C for one
### Tip Res
This indicates the tip resistance that the device is currently using. For devices with multiple possible values to choose from (Pinecil V2), the appropriate value is set automatically.
### RTip ### RTip
This is the raw tip reading in μV. This can be used when assessing the calibration routines for example. This is the raw tip reading in μV. This can be used when assessing the calibration routines for example.
@@ -34,22 +54,15 @@ This can be used with RTip for assessing temperature processing performance.
This is the handle temperature in °C. This is used for cold junction compensation of the tip temperature. This is the handle temperature in °C. This is used for cold junction compensation of the tip temperature.
This is shown in degrees Celsius x10, so 200 == 20.0 °C This is shown in degrees Celsius x10, so 200 == 20.0 °C
### CMax
This indicates the max temperature in degrees Celsius that the system estimates it can measure the tip reliably to.
This is dependent on a few factors including the handle temperature so it can move around during use.
### Vin ### Vin
The input voltage as read by the internal ADC. Can be used to sanity check its being read correctly. The input voltage as read by the internal ADC. Can be used to sanity check its being read correctly.
### ACC
This indicates the accelerometer that is fitted inside the unit.
- MMA8652
- LIS2DH12
- BMA223
- MSA301
- SC7A20
- None detected -> running in fallback without movement detection
- Scanning -> Still searching I2C for one
### PWR ### PWR
This indicates the current power source for the iron. This indicates the current power source for the iron.
@@ -60,15 +73,6 @@ This may change during power up as the sources are negotiated in turn.
- **PD W. VBus** input (PD subsystem is used to negotiate for current supply); and VBus is connected to your input power source - **PD W. VBus** input (PD subsystem is used to negotiate for current supply); and VBus is connected to your input power source
- **PD No VBus** input (PD subsystem is used to negotiate for current supply); and VBus is **NOT** connected to your input power source. If it is Not required or possible to do a special mod of your PCB (i.e. late model V1, some early Green PCB models) then 'PD No VBus' displays on screen, see details and PD Debug [below](/Documentation/DebugMenu.md#pd-debug-menu). Or if you had 'PD Vbus' displayed before and then successfully modified the Pinecil to support 24V by cutting the trace line to Vbus, then you will see 'PD No Vbus' now as a confirmation that the cut worked. - **PD No VBus** input (PD subsystem is used to negotiate for current supply); and VBus is **NOT** connected to your input power source. If it is Not required or possible to do a special mod of your PCB (i.e. late model V1, some early Green PCB models) then 'PD No VBus' displays on screen, see details and PD Debug [below](/Documentation/DebugMenu.md#pd-debug-menu). Or if you had 'PD Vbus' displayed before and then successfully modified the Pinecil to support 24V by cutting the trace line to Vbus, then you will see 'PD No Vbus' now as a confirmation that the cut worked.
### ID
- This is used by Irons that have an ID and serial number to help check if the iron is authentic. All Pinecil V1 show the same ID number as this is the number programmed into the MCU.
- The new Pinecil V2 released Aug. 2, 2022 now uses BL706, which enables generating a unique ID/Serial number to every iron. This can be used to [verify your V2 authenticity here](https://pinecil.pine64.org/).
### Max
This indicates the max temperature in degrees Celsius that the system estimates it can measure the tip reliably to.
This is dependent on a few factors including the handle temperature so it can move around during use.
### HW G ### HW G
This indicates the high water mark for the stack for the GUI thread. The smaller this number is, the less headroom we have in the stack. This indicates the high water mark for the stack for the GUI thread. The smaller this number is, the less headroom we have in the stack.

View File

@@ -120,17 +120,17 @@ def get_constants(build_version: str) -> List[Tuple[str, str]]:
def get_debug_menu() -> List[str]: def get_debug_menu() -> List[str]:
return [ return [
datetime.today().strftime("%d-%m-%y"), datetime.today().strftime("%d-%m-%y"),
"Time ", "ID ",
"UpTime ",
"Move ", "Move ",
"ACC ",
"Tip Res",
"RTip ", "RTip ",
"CTip ", "CTip ",
"CHan ", "CHan ",
"CMax ",
"Vin ", "Vin ",
"ACC ",
"PWR ", "PWR ",
"ID ",
"Max ",
"Tip Res",
"HW G ", "HW G ",
"HW M ", "HW M ",
"HW P ", "HW P ",

View File

@@ -688,38 +688,64 @@ void showDebugMenu(void) {
OLED::setCursor(0, 8); // second line OLED::setCursor(0, 8); // second line
OLED::print(DebugMenu[screen], FontStyle::SMALL); OLED::print(DebugMenu[screen], FontStyle::SMALL);
switch (screen) { switch (screen) {
case 0: // Just prints date case 0: // Build Date
break; break;
case 1: case 1:
// system up time stamp // Device ID
OLED::printNumber(xTaskGetTickCount() / TICKS_100MS, 5, FontStyle::SMALL); {
uint64_t id = getDeviceID();
#ifdef DEVICE_HAS_VALIDATION_CODE
// If device has validation code; then we want to take over both lines of the screen
OLED::clearScreen(); // Ensure the buffer starts clean
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
OLED::print(DebugMenu[screen], FontStyle::SMALL);
OLED::drawHex(getDeviceValidation(), FontStyle::SMALL, 8);
OLED::setCursor(0, 8); // second line
#endif
OLED::drawHex((uint32_t)(id >> 32), FontStyle::SMALL, 8);
OLED::drawHex((uint32_t)(id & 0xFFFFFFFF), FontStyle::SMALL, 8);
}
break; break;
case 2: case 2:
// Movement time stamp // System Uptime
OLED::printNumber(lastMovementTime / TICKS_100MS, 5, FontStyle::SMALL); OLED::printNumber(xTaskGetTickCount() / TICKS_100MS, 5, FontStyle::SMALL);
break; break;
case 3: case 3:
// Raw Tip // Movement Timestamp
{ OLED::printNumber(TipThermoModel::convertTipRawADCTouV(getTipRawTemp(0), true), 6, FontStyle::SMALL); } OLED::printNumber(lastMovementTime / TICKS_100MS, 5, FontStyle::SMALL);
break; break;
case 4: case 4:
// ACC Type
OLED::print(AccelTypeNames[(int)DetectedAccelerometerVersion], FontStyle::SMALL);
break;
case 5:
// Tip Resistance
OLED::printNumber(getTipResistanceX10() / 10, 4, FontStyle::SMALL); // large to pad over so that we cover ID left overs
OLED::print(SymbolDot, FontStyle::SMALL);
OLED::printNumber(getTipResistanceX10() % 10, 1, FontStyle::SMALL);
break;
case 6:
// Raw Tip in uV
{ OLED::printNumber(TipThermoModel::convertTipRawADCTouV(getTipRawTemp(0), true), 6, FontStyle::SMALL); }
break;
case 7:
// Temp in C // Temp in C
OLED::printNumber(TipThermoModel::getTipInC(), 5, FontStyle::SMALL); OLED::printNumber(TipThermoModel::getTipInC(), 5, FontStyle::SMALL);
break; break;
case 5: case 8:
// Handle Temp // Handle Temp in C
OLED::printNumber(getHandleTemperature(0), 6, FontStyle::SMALL); OLED::printNumber(getHandleTemperature(0), 6, FontStyle::SMALL);
break; break;
case 6: case 9:
// Voltage input // Max C Limit
OLED::printNumber(TipThermoModel::getTipMaxInC(), 3, FontStyle::SMALL);
break;
case 10:
// Input Voltage
printVoltage(); printVoltage();
break; break;
case 7: case 11:
// Print ACC type // Power Negotiation Status
OLED::print(AccelTypeNames[(int)DetectedAccelerometerVersion], FontStyle::SMALL);
break;
case 8:
// Power negotiation status
{ {
int sourceNumber = 0; int sourceNumber = 0;
if (getIsPoweredByDCIN()) { if (getIsPoweredByDCIN()) {
@@ -754,48 +780,22 @@ void showDebugMenu(void) {
OLED::print(PowerSourceNames[sourceNumber], FontStyle::SMALL); OLED::print(PowerSourceNames[sourceNumber], FontStyle::SMALL);
} }
break; break;
case 9:
// Print device ID Numbers
{
uint64_t id = getDeviceID();
#ifdef DEVICE_HAS_VALIDATION_CODE
// If device has validation code; then we want to take over both lines of the screen
OLED::clearScreen(); // Ensure the buffer starts clean
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
OLED::print(DebugMenu[screen], FontStyle::SMALL);
OLED::drawHex(getDeviceValidation(), FontStyle::SMALL, 8);
OLED::setCursor(0, 8); // second line
#endif
OLED::drawHex((uint32_t)(id >> 32), FontStyle::SMALL, 8);
OLED::drawHex((uint32_t)(id & 0xFFFFFFFF), FontStyle::SMALL, 8);
}
break;
case 10:
// Max deg C limit
OLED::printNumber(TipThermoModel::getTipMaxInC(), 3, FontStyle::SMALL);
break;
case 11:
// Tip resistance
OLED::printNumber(getTipResistanceX10() / 10, 4, FontStyle::SMALL); // large to pad over so that we cover ID left overs
OLED::print(SymbolDot, FontStyle::SMALL);
OLED::printNumber(getTipResistanceX10() % 10, 1, FontStyle::SMALL);
break;
case 12: case 12:
// High water mark for GUI // High Water Mark for GUI
OLED::printNumber(uxTaskGetStackHighWaterMark(GUITaskHandle), 5, FontStyle::SMALL); OLED::printNumber(uxTaskGetStackHighWaterMark(GUITaskHandle), 5, FontStyle::SMALL);
break; break;
case 13: case 13:
// High water mark for the Movement task // High Water Mark for Movement Task
OLED::printNumber(uxTaskGetStackHighWaterMark(MOVTaskHandle), 5, FontStyle::SMALL); OLED::printNumber(uxTaskGetStackHighWaterMark(MOVTaskHandle), 5, FontStyle::SMALL);
break; break;
case 14: case 14:
// High water mark for the PID task // High Water Mark for PID Task
OLED::printNumber(uxTaskGetStackHighWaterMark(PIDTaskHandle), 5, FontStyle::SMALL); OLED::printNumber(uxTaskGetStackHighWaterMark(PIDTaskHandle), 5, FontStyle::SMALL);
break; break;
break; break;
#ifdef HALL_SENSOR #ifdef HALL_SENSOR
case 15: case 15:
// Print raw hall effect value if availabe, none if hall effect disabled. // Raw Hall Effect Value
{ {
int16_t hallEffectStrength = getRawHallEffect(); int16_t hallEffectStrength = getRawHallEffect();
if (hallEffectStrength < 0) if (hallEffectStrength < 0)