1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-30 01:30:05 +02:00

clang format

This commit is contained in:
Jesse Schoch
2021-08-05 12:55:33 -07:00
parent 68f934d714
commit a26d86f607
2 changed files with 40 additions and 46 deletions

View File

@@ -39,8 +39,6 @@ namespace Spindles {
// Note: The direction command is always called on M3,M4, and M5 // Note: The direction command is always called on M3,M4, and M5
// This is where the spindle start/stop should be sent // This is where the spindle start/stop should be sent
// NOTE: data length is excluding the CRC16 checksum. // NOTE: data length is excluding the CRC16 checksum.
data.tx_length = 6; data.tx_length = 6;
data.rx_length = 6; data.rx_length = 6;
@@ -64,7 +62,6 @@ namespace Spindles {
} }
void L510::set_speed_command(uint32_t rpm, ModbusCommand& data) { void L510::set_speed_command(uint32_t rpm, ModbusCommand& data) {
// NOTE: data length is excluding the CRC16 checksum. // NOTE: data length is excluding the CRC16 checksum.
data.tx_length = 6; data.tx_length = 6;
data.rx_length = 6; data.rx_length = 6;
@@ -111,7 +108,6 @@ namespace Spindles {
data.tx_length = 6; data.tx_length = 6;
data.rx_length = 11; data.rx_length = 11;
// read parameters 02-03..02-06 // read parameters 02-03..02-06
// Send: // Send:
@@ -121,8 +117,6 @@ namespace Spindles {
data.msg[4] = 0x00; // Read 4 values data.msg[4] = 0x00; // Read 4 values
data.msg[5] = 0x04; data.msg[5] = 0x04;
// Recv: ?? // Recv: ??
return [](const uint8_t* response, Spindles::VFD* vfd) -> bool { return [](const uint8_t* response, Spindles::VFD* vfd) -> bool {
@@ -136,7 +130,8 @@ namespace Spindles {
l510->_max_rpm = rpm; l510->_max_rpm = rpm;
l510->_max_freq = freq; l510->_max_freq = freq;
grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "L510 initialized: spindle max_rpm %d max_freq %d", vfd->_max_rpm,l510->_max_freq); grbl_msg_sendf(
CLIENT_SERIAL, MsgLevel::Info, "L510 initialized: spindle max_rpm %d max_freq %d", vfd->_max_rpm, l510->_max_freq);
return true; return true;
}; };
@@ -149,7 +144,6 @@ namespace Spindles {
data.tx_length = 6; data.tx_length = 6;
data.rx_length = 5; data.rx_length = 5;
// Send: // Send:
data.msg[1] = 0x03; // READ data.msg[1] = 0x03; // READ
data.msg[2] = 0x25; // 0x2520 = Get state data.msg[2] = 0x25; // 0x2520 = Get state