Skip to content

Commit

Permalink
Update 3.Maintenance_and_Logs_Guide.md
Browse files Browse the repository at this point in the history
  • Loading branch information
206cc authored Sep 13, 2024
1 parent c6a8f05 commit 5d0ce59
Showing 1 changed file with 27 additions and 13 deletions.
40 changes: 27 additions & 13 deletions docs/3.Maintenance_and_Logs_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,22 @@ Starting from version V2.5, a simple logging system has been introduced to help

### System Log `sys_log.txt`

This log file is viewable on a computer. You can customize the log's storage location using the built-in `logs_save()` function. When the log file reaches 100KB, the system will automatically rename and overwrite it.

**Format:**
```
Triggered function: Total tension count / Custom information
```
System logs are used to record key information and error messages during system operation, making it easier for future diagnostics and maintenance. They can be viewed on a computer, and starting from version v2.72, they can also be viewed through the Boot Mode Selector. When the log file reaches 100KB, the system will automatically rename and overwrite it.

**Example:**

The following is an error message captured during system operation. This error was caused by an unstable LCD, which led to a system crash. The system used try-except to capture this rare exception and recorded it in sys_log.txt, thereby improving debugging efficiency.

```
init(HX711):55863T/21188/21465/401/90
forward():55863T/No String?
start_tensioning():55863T/ts_err#0
forward():55863T/No String?
start_tensioning():55863T/ts_err#0
init(HX711):55863T/21188/21493/487/90
start_tensioning():4927T/[Errno 110] ETIMEDOUT / MEM: 127376 bytes
Traceback (most recent call last):
File "main.py", line 679, in start_tensioning
File "main.py", line 392, in lcd_putstr
File "src/lcd_api.py", line 154, in putstr
File "src/lcd_api.py", line 140, in putchar
File "src/pico_i2c_lcd.py", line 87, in hal_write_data
OSError: [Errno 110] ETIMEDOUT
```

### Stringing Log `logs.txt`
Expand Down Expand Up @@ -97,4 +98,17 @@ Reliability test count / Total tension count / Automatic tension parameter / Tes
4524/60387T/1.04/0.97/13
4525/60388T/1.03/0.97/12
4526/60389T/1.04/0.97/13
```
```

## Boot Mode Selector

Starting from version V2.72, the system has introduced a Boot Mode Selector, allowing users to quickly enter specific modes by holding different keys during startup. This makes system maintenance, upgrades, and testing more convenient.

- By pressing and holding specific keys, then powering on, you can now enter different modes:
- Up Key: Enters Reliability Testing mode
- Down Key: Enters Software Update mode
- Middle Key: Enters Hardware Function Testing mode
- Right Key: Displays system logs (`sys_log.txt`)
- Exit Key: Performs a Factory Reset

Note: Do not release the keys until you see the mode displayed on the LCD screen.

0 comments on commit 5d0ce59

Please sign in to comment.