Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firmware.py V0.0.1 #169

Merged
merged 1 commit into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 75 additions & 6 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,77 @@

# Cartographer Setup Script v0.0.1 (WIP)
# Firmware Flasher Script v0.0.1

A Python script for installation of neccasary options into klipper config for cartographer (scanner) probe.
A Python-based tool for managing and flashing firmware configurations for 3D printer setups. This script provides options to debug, select firmware versions, and handle configurations for CAN, USB, and DFU modes.

## Features

- **Interactive Menus:** Navigate through options with dynamic menus.
- **Debug Mode:** Enables detailed output for troubleshooting.
- **Firmware Selection:** Automatically retrieve and select firmware files based on device or user input.
- **Multi-mode Flashing:**
- CAN: Supports flashing devices over CAN.
- USB: Support for USB flashing.
- DFU: Support for DFU flashing.
- **High-Temperature Firmware Support:** Search specifically for high-temperature configurations.
- **Katapult Support:** Includes integration with the Katapult tool for CAN device management.

## Prerequisites

- Python 3.8+ installed on your system.
- Access to required tools such as `curl` and `tar` for firmware handling.

## Usage

Run the script with various command-line arguments to perform tasks.

### Command-Line Arguments

| Argument | Description | Example Usage |
|-----------------|---------------------------------------------------------------------------------|-------------------------------------|
| `-b`, `--branch` | Specify the branch to retrieve firmware from (default: `master`). | `python3 firmware.py -b dev` |
| `-D`, `--debug` | Enable debug mode for detailed output. | `python3 firmware.py -D` |
| `-t`, `--type` | Enable Katapult flash mode. | `python3 firmware.py -t` |
| `-H`, `--high-temp` | Search for high-temperature firmware (`HT` directories). | `python3 firmware.py -H` |
| `-a`, `--all` | Will list all available firmware not just latest | `python3 firmware.py -a` |
| `-k`, `--kseries` | Enable support for Creality K-Series printers. | `python3 firmware.py -k` |
| `-f`, `--flash` | Specify the flashing mode (`CAN`, `USB`, or `DFU`). | `python3 firmware.py -f CAN` |
| `-d`, `--device` | Specify a device UUID for flashing. | `python3 firmware.py -d <UUID>` |

### Examples

#### Flash Firmware via CAN
```bash
python3 firmware.py -f CAN
```

#### Enable Debug Mode
```bash
python3 firmware.py -d
```

#### Flash High-Temperature Firmware
```bash
python3 firmware.py -H -f CAN
```


## Menus

The script provides an interactive menu-based interface. Key menus include:

- **Main Menu:** Choose between CAN, USB, and DFU modes.
- **CAN Menu:** Options to find and flash CAN devices.
- **Firmware Menu:** List available firmware files and select one for flashing.
- **Confirmation Menu:** Confirm selected firmware and device before flashing.

## Debugging

Use the `-d` flag to enable debug mode, which provides detailed logs of operations.


# Cartographer Setup Script v0.0.1

A Python script for automatically setting up klipper

It will create and add a folder and file, the include them in printer.cfg.

Expand All @@ -12,8 +82,8 @@ It will create and add a folder and file, the include them in printer.cfg.
- [scanner]
uuid or serial id
X and Y offsets

and possibly others, check them all
and possibly others, check them all

## Features
- **Debug Mode:** Enables detailed output for debugging purposes.
Expand Down Expand Up @@ -61,5 +131,4 @@ python3 script.py -u
```

## Contributing
Contributions are welcome! Feel free to fork the repository, make changes, and submit a pull request.

Contributions are welcome! Feel free to fork the repository, make changes, and submit a pull request.
Loading
Loading