Comment out stale implementation in Serial, fix #2150

This commit is contained in:
Vojtech Kral 2019-08-02 15:11:50 +02:00
parent c791ba776f
commit bfb135bcc3
3 changed files with 17 additions and 2 deletions

View file

@ -353,6 +353,8 @@ void Serial::set_baud_rate(unsigned baud_rate)
} }
} }
/*
void Serial::set_DTR(bool on) void Serial::set_DTR(bool on)
{ {
auto handle = native_handle(); auto handle = native_handle();
@ -495,6 +497,7 @@ std::string Serial::printer_format_line(const std::string &line, unsigned line_n
return (boost::format("N%1% %2%*%3%\n") % line_num_str % line % checksum).str(); return (boost::format("N%1% %2%*%3%\n") % line_num_str % line % checksum).str();
} }
*/
} // namespace Utils } // namespace Utils

View file

@ -46,6 +46,17 @@ public:
~Serial(); ~Serial();
void set_baud_rate(unsigned baud_rate); void set_baud_rate(unsigned baud_rate);
// The Serial implementation is currently in disarray and therefore commented out.
// The boost implementation seems to have several problems, such as lack of support
// for custom baud rates, few weird implementation bugs and a history of API breakages.
// It's questionable whether it solves more problems than causes. Probably not.
// TODO: Custom implementation not based on asio.
//
// As of now, this class is only kept for the purpose of rebooting AVR109,
// see FirmwareDialog::priv::avr109_reboot()
/*
void set_DTR(bool on); void set_DTR(bool on);
// Resets the line number both internally as well as with the firmware using M110 // Resets the line number both internally as well as with the firmware using M110
@ -76,6 +87,7 @@ public:
static std::string printer_format_line(const std::string &line, unsigned line_num); static std::string printer_format_line(const std::string &line, unsigned line_num);
private: private:
unsigned m_line_num = 0; unsigned m_line_num = 0;
*/
}; };