|
@@ -19,22 +19,23 @@
|
19
|
19
|
*/
|
20
|
20
|
#ifdef __PLAT_LINUX__
|
21
|
21
|
|
22
|
|
-extern void setup();
|
23
|
|
-extern void loop();
|
24
|
|
-
|
25
|
|
-#include <thread>
|
26
|
|
-
|
27
|
|
-#include <iostream>
|
28
|
|
-#include <fstream>
|
|
22
|
+//#define GPIO_LOGGING // Full GPIO and Positional Logging
|
29
|
23
|
|
30
|
24
|
#include "../../inc/MarlinConfig.h"
|
31
|
|
-#include <stdio.h>
|
32
|
|
-#include <stdarg.h>
|
33
|
25
|
#include "../shared/Delay.h"
|
34
|
26
|
#include "hardware/IOLoggerCSV.h"
|
35
|
27
|
#include "hardware/Heater.h"
|
36
|
28
|
#include "hardware/LinearAxis.h"
|
37
|
29
|
|
|
30
|
+#include <stdio.h>
|
|
31
|
+#include <stdarg.h>
|
|
32
|
+#include <thread>
|
|
33
|
+#include <iostream>
|
|
34
|
+#include <fstream>
|
|
35
|
+
|
|
36
|
+extern void setup();
|
|
37
|
+extern void loop();
|
|
38
|
+
|
38
|
39
|
// simple stdout / stdin implementation for fake serial port
|
39
|
40
|
void write_serial_thread() {
|
40
|
41
|
for (;;) {
|
|
@@ -64,8 +65,6 @@ void simulation_loop() {
|
64
|
65
|
LinearAxis z_axis(Z_ENABLE_PIN, Z_DIR_PIN, Z_STEP_PIN, Z_MIN_PIN, Z_MAX_PIN);
|
65
|
66
|
LinearAxis extruder0(E0_ENABLE_PIN, E0_DIR_PIN, E0_STEP_PIN, P_NC, P_NC);
|
66
|
67
|
|
67
|
|
- //#define GPIO_LOGGING // Full GPIO and Positional Logging
|
68
|
|
-
|
69
|
68
|
#ifdef GPIO_LOGGING
|
70
|
69
|
IOLoggerCSV logger("all_gpio_log.csv");
|
71
|
70
|
Gpio::attachLogger(&logger);
|
|
@@ -88,7 +87,7 @@ void simulation_loop() {
|
88
|
87
|
|
89
|
88
|
#ifdef GPIO_LOGGING
|
90
|
89
|
if (x_axis.position != x || y_axis.position != y || z_axis.position != z) {
|
91
|
|
- uint64_t update = MAX3(x_axis.last_update, y_axis.last_update, z_axis.last_update);
|
|
90
|
+ uint64_t update = _MAX(x_axis.last_update, y_axis.last_update, z_axis.last_update);
|
92
|
91
|
position_log << update << ", " << x_axis.position << ", " << y_axis.position << ", " << z_axis.position << std::endl;
|
93
|
92
|
position_log.flush();
|
94
|
93
|
x = x_axis.position;
|