+ }else if (what == "raw") {
+ // issues raw steps to the specified axis usage: axis steps steps/sec
+ string axis = shift_parameter( parameters );
+ string stepstr = shift_parameter( parameters );
+ string stepspersec = shift_parameter( parameters );
+ if(axis.empty() || stepstr.empty() || stepspersec.empty()) {
+ stream->printf("error: Need axis steps steps/sec\n");
+ return;
+ }
+
+ char ax= toupper(axis[0]);
+ uint8_t a= ax >= 'X' ? ax - 'X' : ax - 'A' + 3;
+ int steps= strtol(stepstr.c_str(), NULL, 10);
+ bool dir= steps >= 0;
+ steps= std::abs(steps);
+
+ if(a > C_AXIS) {
+ stream->printf("error: axis must be x, y, z, a, b, c\n");
+ return;
+ }
+
+ if(a >= THEROBOT->get_number_registered_motors()) {
+ stream->printf("error: axis is out of range\n");
+ return;
+ }
+
+ uint32_t sps= strtol(stepspersec.c_str(), NULL, 10);
+ sps= std::max(sps, 1UL);
+
+ uint32_t delayus= 1000000.0F / sps;
+ for(int s= 0;s<steps;s++) {
+ if(THEKERNEL->is_halted()) break;
+ THEROBOT->actuators[a]->manual_step(dir);
+ // delay but call on_idle
+ safe_delay_us(delayus);
+ }
+
+ // reset the position based on current actuator position
+ THEROBOT->reset_position_from_current_actuator_position();
+
+ //stream->printf("done\n");
+