Permalink
Browse files

Remove unused preference settings ReceivingBufferSize and ValidateCon…

…nection. Remove unimplemented kick function. Conneciton errors now display alert dialog.
  • Loading branch information...
1 parent c1f20b7 commit 581a50f1e59fa3646ff548b2fb1902c7e4cd227a @maurerpe maurerpe committed Feb 10, 2013
View
@@ -397,18 +397,12 @@ Enable Acceleration::
Distance used to read full speed::
Distance to accelerate over, measured in millimeters.
-Buffer size on printer::
- Number of commands the printer is able to buffer in it's memory.
-
Port::
Manually selects the serial communication port that you want to talk across.
Speed::
The serial communications baud rate. Typically 19200 - must however match the setting in your firmware. For example in the latest svn firmware the baud is 57600 by default in configuration.h the value in repsnapper must match this value.
-Validate connection::
- unknown
-
=== GCode tab ===
Here you can create, save, load and/or edit the GCode.
@@ -505,9 +499,6 @@ Print::
Pause::
Pauses communication with the printer.
-Kick::
- unknown
-
Fan on::
Sends the M106 / M107 codes to the printer to toggle the fan on / off respectively.
@@ -295,8 +295,10 @@ bool Printer::Idle( void ) {
while ( ( str = ReadLog() ) != "" )
m_view->comm_log( str );
- while ( ( str = ReadErrorLog() ) != "" )
+ while ( ( str = ReadErrorLog() ) != "" ) {
+ alert( str.c_str() );
m_view->err_log( str );
+ }
}
if ( ( is_connected = IsConnected() ) != was_connected ) {
@@ -70,7 +70,6 @@ class Printer : public ThreadedPrinterSerial {
double get_temp( TempType t ) { return temps[(int)t]; }
void Pause( void ) { StopPrinting(); }
- void Kick( void ) {}; // this does nothing
bool SwitchPower( bool on );
bool SelectExtruder( int extruder_no=-1 );
bool SetTemp( TempType type, float value, int extruder_no=-1 );
@@ -73,7 +73,9 @@ PrinterSerial::~PrinterSerial() {
delete [] full_command_scratch;
delete [] full_recv_buffer;
+#ifdef WIN32
delete [] raw_recv;
+#endif
}
bool PrinterSerial::TestPort( const string device ) {
@@ -261,7 +263,7 @@ bool PrinterSerial::RawConnect( string device, int baudrate ) {
// Open file
if ( ( device_fd = open( device.c_str(), O_RDWR | O_NOCTTY ) ) < 0 ) {
ostringstream os;
- os << "Could not open serial device: \"" << device << "\"" << strerror( errno ) << endl;
+ os << "Could not open serial device: \"" << device << "\": " << strerror( errno ) << endl;
LogError( os.str().c_str() );
return false;
}
@@ -598,7 +600,7 @@ char *PrinterSerial::RecvLine( void ) {
recv_buffer[ tot_size ] = '\0';
memmove( raw_recv, raw_recv + tot_size, strlen( raw_recv + tot_size ) + 1 );
#else
- char *buf = recvd;
+ char *buf = recv_buffer;
bool done = false;
ssize_t num;
struct timeval timeout;
@@ -34,7 +34,7 @@ ThreadedPrinterSerial::ThreadedPrinterSerial() :
command_buffer( command_buffer_size, command_buffer_sleep, "", false, true ),
response_buffer( response_buffer_size, true, response_buffer_sleep, "", true, false ),
log_buffer( log_buffer_size, false, log_buffer_sleep, "\n*** Log overflow ***\n\n", true, false ),
- error_buffer( log_buffer_size, false, log_buffer_sleep, "\n*** Error Log overflow ***\n\n", true, false ) {
+ error_buffer( log_buffer_size, true, log_buffer_sleep, "\n*** Error Log overflow ***\n\n", true, false ) {
request_print = is_printing = printing_complete = false;
printer_commands = NULL;
pc_lines_printed = 0;
View
@@ -34,9 +34,7 @@ PrintMargin.Y=10
PrintMargin.Z=0
PortName=/dev/ttyUSB0
SerialSpeed=115200
-ValidateConnection=true
KeepLines=1000
-ReceivingBufferSize=4
[Extruder]
CalibrateInput=true
View
@@ -2659,21 +2659,6 @@ Otherwise the STL will contain separate Objects and it will be in ASCII mode (so
</packing>
</child>
<child>
- <object class="GtkToolButton" id="p_kick">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Kick</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Kick</property>
- <property name="use_underline">True</property>
- <property name="stock_id">gtk-media-forward</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
<object class="GtkToolButton" id="p_home">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -4652,33 +4637,6 @@ Otherwise the STL will contain separate Objects and it will be in ASCII mode (so
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
- <object class="GtkSpinButton" id="Hardware.ReceivingBufferSize">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_text" translatable="yes">Recommended value for FiveD is 4</property>
- <property name="invisible_char">•</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label46">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Printer Buffer Size (Lines of GCode)</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -4732,21 +4690,6 @@ Otherwise the STL will contain separate Objects and it will be in ASCII mode (so
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="Hardware.ValidateConnection">
- <property name="label" translatable="yes">Validate Connection</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
<object class="GtkComboBox" id="Hardware.SerialSpeed">
<property name="visible">True</property>
<property name="can_focus">False</property>
View
@@ -132,9 +132,7 @@ static struct {
{ OFFSET (Hardware.PortName), T_STRING, "Hardware.PortName", NULL, 0, DEFAULT_COM_PORT, false },
{ OFFSET (Hardware.SerialSpeed), T_INT, "Hardware.SerialSpeed", NULL, 115200, NULL, false },
- BOOL_MEMBER (Hardware.ValidateConnection, "ValidateConnection", true, false),
INT_MEMBER (Hardware.KeepLines, "KeepLines", 1000, false),
- INT_MEMBER (Hardware.ReceivingBufferSize, "ReceivingBufferSize", 4, false),
BOOL_MEMBER (Hardware.SpeedAlways, "SpeedAlways", false, false),
// Extruder
@@ -386,7 +384,6 @@ static struct {
{ "Hardware.MaxMoveSpeedXY", 0.1, 2000.0, 1.0, 10.0 },
{ "Hardware.MinMoveSpeedZ", 0.1, 250.0, 1.0, 10.0 },
{ "Hardware.MaxMoveSpeedZ", 0.1, 250.0, 1.0, 10.0 },
- { "Hardware.ReceivingBufferSize", 1.0, 100.0, 1.0, 5.0 },
{ "Hardware.KeepLines", 100.0, 100000.0, 1.0, 500.0 },
// { "Hardware.DistanceToReachFullSpeed", 0.0, 10.0, 0.1, 1.0 },
View
@@ -83,11 +83,8 @@ class Settings {
std::string PortName;
int SerialSpeed;
- bool ValidateConnection;
int KeepLines;
- int ReceivingBufferSize;
-
bool SpeedAlways;
};
HardwareSettings Hardware;
View
@@ -933,12 +933,6 @@ void View::power_toggled(Gtk::ToggleToolButton *button)
m_printer->SwitchPower (button->get_active());
}
-void View::kick_clicked()
-{
- m_printer->Kick();
- //printing_changed();
-}
-
void View::print_clicked()
{
m_printer->StartPrinting();
@@ -1192,7 +1186,6 @@ View::View(BaseObjectType* cobject,
connect_tooltoggled("p_pause", sigc::mem_fun(*this, &View::pause_toggled));
// m_builder->get_widget ("p_stop", m_stop_button);
// m_stop_button->signal_clicked().connect (sigc::mem_fun(*this, &View::stop_clicked) );
- connect_button ("p_kick", sigc::mem_fun(*this, &View::kick_clicked) );
connect_button ("p_home", sigc::mem_fun(*this, &View::home_all));
connect_button ("p_reset", sigc::mem_fun(*this, &View::reset_clicked));
connect_tooltoggled("p_power", sigc::mem_fun(*this, &View::power_toggled) );
View
@@ -61,7 +61,6 @@ class View : public Gtk::Window
void send_gcode();
void printing_changed();
void power_toggled(Gtk::ToggleToolButton *button);
- void kick_clicked();
void print_clicked();
/* void stop_clicked(); */
void pause_toggled(Gtk::ToggleToolButton *button);

0 comments on commit 581a50f

Please sign in to comment.