raise3d touchscreen configuration
I am working on a repetier build for the raise3D n-series printers. This printer has a linux based touchscreen that is connected to a rumba motion controller board.
It uses marlin by default. I have managed to create a firmware based marlin RC8 firmware for the printer so I know what it is looking for communication wise to talk over the series connection.
Now I would like to make a version of repetier that works on the printer. But the code base for repetier is a bit different.
What I have found is that in order to successfully update any firmware, the touchscreen is looking for an SD init fail message. That is the easy part, I just need to enable the SD card.
the other places that need customized are the M105, M109, and M190 commands for the format that the touchscreen is parsing for.
the most important communication part is with the ok to send message. they are appending block_buffer_head - block_buffer_tail + Block_buffer_size. The code for marlin looks like this.
void ok_to_send() {
refresh_cmd_timeout();
if (!send_ok[cmd_queue_index_r]) return;
SERIAL_PROTOCOLPGM(MSG_OK);
#if ENABLED(ADVANCED_OK)
char* p = command_queue[cmd_queue_index_r];
if (*p == 'N') {
SERIAL_PROTOCOL(' ');
SERIAL_ECHO(*p++);
while (NUMERIC_SIGNED(*p))
SERIAL_ECHO(*p++);
}
SERIAL_PROTOCOLPGM(" P"); SERIAL_PROTOCOL(int(BLOCK_BUFFER_SIZE - planner.movesplanned() - 1));
SERIAL_PROTOCOLPGM(" B"); SERIAL_PROTOCOL(BUFSIZE - commands_in_queue);
#if ENABLED(N_SERIES_PROTOCLE)
SERIAL_PROTOCOL(':');
if (planner.block_buffer_tail == planner.block_buffer_head)
{
SERIAL_PROTOCOL(0);
}else
{
SERIAL_PROTOCOL((planner.block_buffer_head - planner.block_buffer_tail + BLOCK_BUFFER_SIZE)%BLOCK_BUFFER_SIZE);
}
SERIAL_EOL;
}
note: this is the code for my marlin RC8 build.
This is the code from raise3D marlin firmware.
void ClearToSend()
{
previous_millis_cmd = millis();
#ifdef SDSUPPORT
if(fromsd[bufindr])
return;
#endif //SDSUPPORT
SERIAL_PROTOCOL(MSG_OK);
SERIAL_PROTOCOL(':');
if (block_buffer_tail == block_buffer_head)
{
SERIAL_PROTOCOLLN(0);
}else
{
SERIAL_PROTOCOLLN((block_buffer_head - block_buffer_tail + BLOCK_BUFFER_SIZE)%BLOCK_BUFFER_SIZE);
}
}
The reason I am posting this here is to see if someone can help me with the code I need for repetier.
Comments