Allow Translate.
This commit is contained in:
@@ -466,26 +466,36 @@ void loop() {
|
|||||||
Serial.print("Read: ");
|
Serial.print("Read: ");
|
||||||
Serial.println(input);
|
Serial.println(input);
|
||||||
Calculator calculator(input);
|
Calculator calculator(input);
|
||||||
|
int x_translate, y_translate;
|
||||||
|
|
||||||
Cube::clear();
|
for (x_translate = 0; x_translate < 4; x_translate++) {
|
||||||
for (x = 0; x < 8; x++) {
|
for (y_translate = 0; y_translate < 4; y_translate++) {
|
||||||
for (y = 0; y < 8; y++) {
|
Cube::clear();
|
||||||
double result = calculator.evaluate();
|
|
||||||
int z;
|
for (int i = 0; i < 8; i++) {
|
||||||
if (!(isinf(result) || isnan(result))) {
|
for (int j = 0; j < 8; j++) {
|
||||||
z = round(result);
|
x = i - x_translate;
|
||||||
Cube::set_status(x, y, z, 3);
|
y = j - y_translate;
|
||||||
|
double result = calculator.evaluate();
|
||||||
|
int z;
|
||||||
|
if (!(isinf(result) || isnan(result))) {
|
||||||
|
z = round(result);
|
||||||
|
Cube::set_status(i, j, z, 3);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
z = 0;
|
||||||
|
}
|
||||||
|
// Serial.print(x);
|
||||||
|
// Serial.print(" ");
|
||||||
|
// Serial.print(y);
|
||||||
|
// Serial.print(" ");
|
||||||
|
// Serial.println(z);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
delay(1000);
|
||||||
z = 0;
|
|
||||||
}
|
|
||||||
Serial.print(x);
|
|
||||||
Serial.print(" ");
|
|
||||||
Serial.print(y);
|
|
||||||
Serial.print(" ");
|
|
||||||
Serial.println(z);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// int z = round(calculator.evaluate());
|
// int z = round(calculator.evaluate());
|
||||||
// Serial.println(z);
|
// Serial.println(z);
|
||||||
Serial.print("Here");
|
Serial.print("Here");
|
||||||
|
|||||||
Reference in New Issue
Block a user