mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-05 13:41:36 +02:00
- Refactored printer card's AMS section for better experience
This commit is contained in:
@@ -21,7 +21,7 @@ async function request<T>(
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
return response.json();
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
// Printer types
|
||||
@@ -55,7 +55,8 @@ export interface AMSTray {
|
||||
tray_id_name: string | null; // Bambu filament ID like "A00-Y2" (can decode to color)
|
||||
tray_info_idx: string | null; // Filament preset ID like "GFA00" - maps to cloud setting_id
|
||||
remain: number;
|
||||
k: number | null; // Pressure advance value
|
||||
k: number | null; // Pressure advance value (from tray or K-profile lookup)
|
||||
cali_idx: number | null; // Calibration index for K-profile lookup
|
||||
tag_uid: string | null; // RFID tag UID (any tag)
|
||||
tray_uuid: string | null; // Bambu Lab spool UUID (32-char hex, only valid for Bambu Lab spools)
|
||||
nozzle_temp_min: number | null; // Min nozzle temperature
|
||||
@@ -1764,6 +1765,11 @@ export const api = {
|
||||
request<FieldDefinitionsResponse>(`/cloud/fields/${presetType}`),
|
||||
getAllCloudFields: () =>
|
||||
request<Record<string, FieldDefinitionsResponse>>('/cloud/fields'),
|
||||
getFilamentInfo: (settingIds: string[]) =>
|
||||
request<Record<string, { name: string; k: number | null }>>('/cloud/filament-info', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(settingIds),
|
||||
}),
|
||||
|
||||
// Smart Plugs
|
||||
getSmartPlugs: () => request<SmartPlug[]>('/smart-plugs/'),
|
||||
|
||||
Reference in New Issue
Block a user