mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 03:54:17 +02:00
Add print options to reprint modal and fix AMS mapping for multi-color prints
Features:
- Add print options UI to reprint modal (bed leveling, flow calibration,
vibration calibration, first layer inspection, timelapse)
- Collapsible "Print Options" section with toggle switches
- Default values: bed leveling=on, vibration_cali=on, others=off
Fixes:
- Fix AMS mapping format to match Bambu Studio exactly
- Use slot_id from 3MF to position tray IDs correctly
- Fill unused slots with -1 placeholder
- Add ams_mapping2 with detailed {ams_id, slot_id} pairs
- Fix print command format for proper printer recognition
- Add auto_bed_leveling, cfg, extrude_cali_flag, nozzle_offset_cali
- Use American spelling "bed_leveling" (not British "bed_levelling")
- Match sequence_id format from official apps
- Prevent duplicate tray assignment in filament matching
This resolves the "stuck at filament change" issue on multi-color reprints
affecting X1C and other multi-AMS printer configurations.
This commit is contained in:
@@ -1707,10 +1707,26 @@ export const api = {
|
||||
used_meters: number;
|
||||
}>;
|
||||
}>(`/archives/${archiveId}/filament-requirements`),
|
||||
reprintArchive: (archiveId: number, printerId: number) =>
|
||||
reprintArchive: (
|
||||
archiveId: number,
|
||||
printerId: number,
|
||||
options?: {
|
||||
ams_mapping?: number[];
|
||||
timelapse?: boolean;
|
||||
bed_levelling?: boolean;
|
||||
flow_cali?: boolean;
|
||||
vibration_cali?: boolean;
|
||||
layer_inspect?: boolean;
|
||||
use_ams?: boolean;
|
||||
}
|
||||
) =>
|
||||
request<{ status: string; printer_id: number; archive_id: number; filename: string }>(
|
||||
`/archives/${archiveId}/reprint?printer_id=${printerId}`,
|
||||
{ method: 'POST' }
|
||||
{
|
||||
method: 'POST',
|
||||
headers: options ? { 'Content-Type': 'application/json' } : undefined,
|
||||
body: options ? JSON.stringify(options) : undefined,
|
||||
}
|
||||
),
|
||||
uploadArchive: async (file: File, printerId?: number): Promise<Archive> => {
|
||||
const formData = new FormData();
|
||||
|
||||
Reference in New Issue
Block a user