reorder debug menu . . . (#1380)
* Update DebugMenu.md * Update make_translation.py * Update GUIThread.cpp * Update DebugMenu.md
This commit is contained in:
@@ -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:
|
||||
|
||||
### 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.
|
||||
|
||||
@@ -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 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
|
||||
|
||||
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 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
|
||||
|
||||
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
|
||||
|
||||
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 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
|
||||
|
||||
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.
|
||||
|
||||
@@ -120,17 +120,17 @@ def get_constants(build_version: str) -> List[Tuple[str, str]]:
|
||||
def get_debug_menu() -> List[str]:
|
||||
return [
|
||||
datetime.today().strftime("%d-%m-%y"),
|
||||
"Time ",
|
||||
"ID ",
|
||||
"UpTime ",
|
||||
"Move ",
|
||||
"ACC ",
|
||||
"Tip Res",
|
||||
"RTip ",
|
||||
"CTip ",
|
||||
"CHan ",
|
||||
"CMax ",
|
||||
"Vin ",
|
||||
"ACC ",
|
||||
"PWR ",
|
||||
"ID ",
|
||||
"Max ",
|
||||
"Tip Res",
|
||||
"HW G ",
|
||||
"HW M ",
|
||||
"HW P ",
|
||||
|
||||
@@ -688,38 +688,64 @@ void showDebugMenu(void) {
|
||||
OLED::setCursor(0, 8); // second line
|
||||
OLED::print(DebugMenu[screen], FontStyle::SMALL);
|
||||
switch (screen) {
|
||||
case 0: // Just prints date
|
||||
case 0: // Build Date
|
||||
break;
|
||||
case 1:
|
||||
// system up time stamp
|
||||
OLED::printNumber(xTaskGetTickCount() / TICKS_100MS, 5, FontStyle::SMALL);
|
||||
// Device ID
|
||||
{
|
||||
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 2:
|
||||
// Movement time stamp
|
||||
OLED::printNumber(lastMovementTime / TICKS_100MS, 5, FontStyle::SMALL);
|
||||
// System Uptime
|
||||
OLED::printNumber(xTaskGetTickCount() / TICKS_100MS, 5, FontStyle::SMALL);
|
||||
break;
|
||||
case 3:
|
||||
// Raw Tip
|
||||
{ OLED::printNumber(TipThermoModel::convertTipRawADCTouV(getTipRawTemp(0), true), 6, FontStyle::SMALL); }
|
||||
// Movement Timestamp
|
||||
OLED::printNumber(lastMovementTime / TICKS_100MS, 5, FontStyle::SMALL);
|
||||
break;
|
||||
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
|
||||
OLED::printNumber(TipThermoModel::getTipInC(), 5, FontStyle::SMALL);
|
||||
break;
|
||||
case 5:
|
||||
// Handle Temp
|
||||
case 8:
|
||||
// Handle Temp in C
|
||||
OLED::printNumber(getHandleTemperature(0), 6, FontStyle::SMALL);
|
||||
break;
|
||||
case 6:
|
||||
// Voltage input
|
||||
case 9:
|
||||
// Max C Limit
|
||||
OLED::printNumber(TipThermoModel::getTipMaxInC(), 3, FontStyle::SMALL);
|
||||
break;
|
||||
case 10:
|
||||
// Input Voltage
|
||||
printVoltage();
|
||||
break;
|
||||
case 7:
|
||||
// Print ACC type
|
||||
OLED::print(AccelTypeNames[(int)DetectedAccelerometerVersion], FontStyle::SMALL);
|
||||
break;
|
||||
case 8:
|
||||
// Power negotiation status
|
||||
case 11:
|
||||
// Power Negotiation Status
|
||||
{
|
||||
int sourceNumber = 0;
|
||||
if (getIsPoweredByDCIN()) {
|
||||
@@ -754,48 +780,22 @@ void showDebugMenu(void) {
|
||||
OLED::print(PowerSourceNames[sourceNumber], FontStyle::SMALL);
|
||||
}
|
||||
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:
|
||||
// High water mark for GUI
|
||||
// High Water Mark for GUI
|
||||
OLED::printNumber(uxTaskGetStackHighWaterMark(GUITaskHandle), 5, FontStyle::SMALL);
|
||||
break;
|
||||
case 13:
|
||||
// High water mark for the Movement task
|
||||
// High Water Mark for Movement Task
|
||||
OLED::printNumber(uxTaskGetStackHighWaterMark(MOVTaskHandle), 5, FontStyle::SMALL);
|
||||
break;
|
||||
case 14:
|
||||
// High water mark for the PID task
|
||||
// High Water Mark for PID Task
|
||||
OLED::printNumber(uxTaskGetStackHighWaterMark(PIDTaskHandle), 5, FontStyle::SMALL);
|
||||
break;
|
||||
break;
|
||||
#ifdef HALL_SENSOR
|
||||
case 15:
|
||||
// Print raw hall effect value if availabe, none if hall effect disabled.
|
||||
// Raw Hall Effect Value
|
||||
{
|
||||
int16_t hallEffectStrength = getRawHallEffect();
|
||||
if (hallEffectStrength < 0)
|
||||
|
||||
Reference in New Issue
Block a user