Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void RTSSHOW::RTS_Init()
- {
- SERIAL_ECHOLNPGM("RTS Init");
- AxisUnitMode = 3;
- active_extruder = active_extruder_font;
- #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
- bool zig = false;
- int8_t inStart, inStop, inInc, showcount;
- showcount = 0;
- // added by John Carlson
- auto mstr = (char*)""; // here is the string I'm trying to build
- //settings.load();
- for (int y = 0; y < GRID_MAX_POINTS_Y; y++)
- {
- // away from origin
- if (zig)
- {
- inStart = 0;
- inStop = GRID_MAX_POINTS_X;
- inInc = 1;
- }
- else
- {
- // towards origin
- inStart = GRID_MAX_POINTS_X - 1;
- inStop = -1;
- inInc = -1;
- }
- zig ^= true;
- for (int x = inStart; x != inStop; x += inInc)
- {
- sprintf_P((char*)mstr, PSTR("%s %f"), mstr, z_values[x][y] * 1000);
- RTS_SndData(z_values[x][y] * 1000, AUTO_BED_LEVEL_1POINT_VP + showcount * 2);
- showcount++;
- }
- sprintf_P((char*)mstr, PSTR("%s %s"), mstr, "\n");
- }
- RTS_SndData((char*)mstr, AUTO_BED_LEVEL_MESH_VP);
- queue.enqueue_now_P(PSTR("M420 S1"));
- #endif
- }
- // declarations for the RTS_SndData function
- void RTS_SndData(void);
- void RTS_SndData(const String &, unsigned long, unsigned char = VarAddr_W);
- void RTS_SndData(const char[], unsigned long, unsigned char = VarAddr_W);
- void RTS_SndData(char, unsigned long, unsigned char = VarAddr_W);
- void RTS_SndData(unsigned char*, unsigned long, unsigned char = VarAddr_W);
- void RTS_SndData(int, unsigned long, unsigned char = VarAddr_W);
- void RTS_SndData(float, unsigned long, unsigned char = VarAddr_W);
- void RTS_SndData(unsigned int,unsigned long, unsigned char = VarAddr_W);
- void RTS_SndData(long,unsigned long, unsigned char = VarAddr_W);
- void RTS_SndData(unsigned long,unsigned long, unsigned char = VarAddr_W);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement