bambuspool
Classes:
| Name | Description |
|---|---|
BambuSpool |
This value object is used by |
BambuSpool
Python
BambuSpool(
id: int,
name: str,
type: str,
sub_brands: str,
color: str,
tray_info_idx: str,
k: float,
bed_temp: int,
nozzle_temp_min: int,
nozzle_temp_max: int,
drying_temp: int = 0,
drying_time: int = 0,
remaining_percent: int = 0,
state: int = 0,
total_length: int = 0,
tray_weight: int = 0,
)
This value object is used by BambuPrinter to enumerate "spools" connected to the printer.
It is used primarily within BambuPrinter's _spools attribute and is returned as part of a
Tuple when there are spools active on machine.
Parameters
- id : int - Spool id can be
0-3for AMS spools or254for the External spool. - name : str - The name of the spool, typically only populated if a Bambu Lab RFID tag is recognized by the AMS.
- type : str - The type of filament in the spool. Will either be read by the RFID tag or set on the Printer display.
- sub_brands : str - For Bambu Lab filaments, specifies the specialization of the filament (Matte, Pro, Tough, etc).
- color : str - Will either be a color hex code or a color name if
webcolorsis able to recognize the color code. - tray_info_idx : str - The underlying index for the selected filament in Bambu Studio.
- k : float - The K-Factor to use for determining optimial linear advance (flow rate).
- bed_temp : int - The target bed temperature to use.
- nozzle_temp_min : int - The minimum usable nozzle temperature to use.
- nozzle_temp_max : int - The maximum usable nozzle temperature to use.
- drying_temp : int - The drying temperature for the filament spool.
- drying_time : int - The drying time for the filament spool.
- remaining_percent : int - The estimated remaining filament percentage.
- state : int - The current state of the spool.
- total_length : int - The total length of filament on the spool in millimeters.
- tray_weight : int - The weight of the filament spool in grams.
Source code in src/bpm/bambuspool.py
Python
def __init__(
self,
id: int,
name: str,
type: str,
sub_brands: str,
color: str,
tray_info_idx: str,
k: float,
bed_temp: int,
nozzle_temp_min: int,
nozzle_temp_max: int,
drying_temp: int = 0,
drying_time: int = 0,
remaining_percent: int = 0,
state: int = 0,
total_length: int = 0,
tray_weight: int = 0,
):
"""
Sets up all internal storage attributes for `BambuSpool`.
Parameters
----------
* id : int - Spool id can be `0-3` for AMS spools or `254` for the External spool.
* name : str - The name of the spool, typically only populated if a Bambu Lab RFID tag is recognized by the AMS.
* type : str - The type of filament in the spool. Will either be read by the RFID tag or set on the Printer display.
* sub_brands : str - For Bambu Lab filaments, specifies the specialization of the filament (Matte, Pro, Tough, etc).
* color : str - Will either be a color hex code or a color name if `webcolors` is able to recognize the color code.
* tray_info_idx : str - The underlying index for the selected filament in Bambu Studio.
* k : float - The K-Factor to use for determining optimial linear advance (flow rate).
* bed_temp : int - The target bed temperature to use.
* nozzle_temp_min : int - The minimum usable nozzle temperature to use.
* nozzle_temp_max : int - The maximum usable nozzle temperature to use.
* drying_temp : int - The drying temperature for the filament spool.
* drying_time : int - The drying time for the filament spool.
* remaining_percent : int - The estimated remaining filament percentage.
* state : int - The current state of the spool.
* total_length : int - The total length of filament on the spool in millimeters.
* tray_weight : int - The weight of the filament spool in grams.
"""
self.id = id
self.name = name
self.type = type
self.sub_brands = sub_brands
self.color = color
self.tray_info_idx = tray_info_idx
self.k = k
self.bed_temp = bed_temp
self.nozzle_temp_min = nozzle_temp_min
self.nozzle_temp_max = nozzle_temp_max
self.drying_temp = drying_temp
self.drying_time = drying_time
self.remaining_percent = remaining_percent
self.state = state
self.total_length = total_length
self.tray_weight = tray_weight