OrcaSlicer
OrcaSlicer copied to clipboard
AMS Filaments Auto-Sync
Is your feature request related to a problem? Please describe. Convenience feature: When switching between multiple Bambu printers trigger a re-sync for the filaments for that device:. Currently you have to click the Device tab, select the printer you are going to be working with, click back to Prepare tab, then click Sync/Resync.
Which printers will be beneficial to this feature Bambu Labs Printers
Describe the solution you'd like An auto-refresh of AMS filaments when switching to a different printer in the Prepare tab.
I would have to test it, or perhaps someone smarter than me could get it coded right. would something like this work? Or am I talking out my ass
In src/slic3r/GUI/Plater.hpp, add the following lines:
#include <wx/timer.h> // Include the wxTimer header
class Plater : public wxPanel
{
...
wxTimer m_timer; // Declare a wxTimer object
void on_timer(wxTimerEvent& event); // Declare a handler function
...
};
// In src/slic3r/GUI/Plater.cpp, add the following lines:
Plater::Plater(wxWindow* parent, MainFrame* main_frame)
: wxPanel(parent), m_main_frame(main_frame)
{
...
m_timer.Bind(wxEVT_TIMER, &Plater::on_timer, this); // Bind the timer event to the handler function
m_timer.Start(5000); // Start the timer with a 5-second interval
...
}
Plater::~Plater()
{
...
m_timer.Stop(); // Stop the timer
...
}
void Plater::on_timer(wxTimerEvent& event)
{
// This function will be called every 5 seconds by the timer
unsigned int unknowns = 0; // The parameter to pass to sync_ams_list
sync_ams_list(unknowns); // Call sync_ams_list
}
Orca bot: this issue is stale because it has been open for 90 days with no activity.
Orca bot: This issue was closed because it has been inactive for 7 days since being marked as stale.