Basic UBL operations working on 32-bit platforms (#8024)

* 32-bit work for UBL

* Update FT i3-2020 reference file
This commit is contained in:
Roxy-3D
2017-10-19 10:44:45 -05:00
committed by GitHub
parent 348e5e3109
commit 5439358281
9 changed files with 101 additions and 59 deletions

View File

@ -49,7 +49,7 @@ void GcodeSuite::M421() {
hasQ = !hasZ && parser.seen('Q');
if (hasC) {
const mesh_index_pair location = ubl.find_closest_mesh_point_of_type(REAL, current_position[X_AXIS], current_position[Y_AXIS], USE_NOZZLE_AS_REFERENCE, NULL, false);
const mesh_index_pair location = ubl.find_closest_mesh_point_of_type(REAL, current_position[X_AXIS], current_position[Y_AXIS], USE_NOZZLE_AS_REFERENCE, NULL);
ix = location.x_index;
iy = location.y_index;
}

View File

@ -137,13 +137,13 @@ void GcodeSuite::M48() {
for (uint8_t n = 0; n < n_samples; n++) {
if (n_legs) {
const int dir = (random(0, 10) > 5.0) ? -1 : 1; // clockwise or counter clockwise
float angle = random(0.0, 360.0);
float angle = random(0, 360);
const float radius = random(
#if ENABLED(DELTA)
0.1250000000 * (DELTA_PROBEABLE_RADIUS),
0.3333333333 * (DELTA_PROBEABLE_RADIUS)
(int) (0.1250000000 * (DELTA_PROBEABLE_RADIUS)),
(int) (0.3333333333 * (DELTA_PROBEABLE_RADIUS))
#else
5.0, 0.125 * min(X_BED_SIZE, Y_BED_SIZE)
(int) 5.0, (int) (0.125 * min(X_BED_SIZE, Y_BED_SIZE))
#endif
);

View File

@ -294,7 +294,7 @@ public:
// Provide simple value accessors with default option
FORCE_INLINE static float floatval(const char c, const float dval=0.0) { return seenval(c) ? value_float() : dval; }
FORCE_INLINE static bool boolval(const char c) { return seenval(c) ? value_bool() : seen(c); }
FORCE_INLINE static bool boolval(const char c) { return seenval(c) ? value_bool() : seen(c); }
FORCE_INLINE static uint8_t byteval(const char c, const uint8_t dval=0) { return seenval(c) ? value_byte() : dval; }
FORCE_INLINE static int16_t intval(const char c, const int16_t dval=0) { return seenval(c) ? value_int() : dval; }
FORCE_INLINE static uint16_t ushortval(const char c, const uint16_t dval=0) { return seenval(c) ? value_ushort() : dval; }