Merge upstream changes from Marlin 2.1.2
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_SPI_FLASH
|
||||
#if ENABLED(SPI_FLASH)
|
||||
|
||||
#include "W25Qxx.h"
|
||||
|
||||
@@ -380,4 +380,4 @@ void W25QXXFlash::SPI_FLASH_BufferRead(uint8_t *pBuffer, uint32_t ReadAddr, uint
|
||||
SPI_FLASH_CS_H();
|
||||
}
|
||||
|
||||
#endif // HAS_SPI_FLASH
|
||||
#endif // SPI_FLASH
|
||||
|
@@ -151,7 +151,9 @@ struct duration_t {
|
||||
* 123456789 (strlen)
|
||||
* 12'34
|
||||
* 99:59
|
||||
* 11d 12:33
|
||||
* 123:45
|
||||
* 1d 12:33
|
||||
* 9999d 12:33
|
||||
*/
|
||||
uint8_t toDigital(char *buffer, bool with_days=false) const {
|
||||
const uint16_t h = uint16_t(this->hour()),
|
||||
@@ -159,7 +161,7 @@ struct duration_t {
|
||||
if (with_days) {
|
||||
const uint16_t d = this->day();
|
||||
sprintf_P(buffer, PSTR("%hud %02hu:%02hu"), d, h % 24, m); // 1d 23:45
|
||||
return d >= 10 ? 9 : 8;
|
||||
return strlen_P(buffer);
|
||||
}
|
||||
else if (!h) {
|
||||
const uint16_t s = uint16_t(this->second() % 60UL);
|
||||
|
@@ -73,10 +73,10 @@ const char* i8tostr3rj(const int8_t x) {
|
||||
}
|
||||
|
||||
#if HAS_PRINT_PROGRESS_PERMYRIAD
|
||||
// Convert unsigned 16-bit permyriad to percent with 100 / 23 / 23.4 / 3.45 format
|
||||
// Convert unsigned 16-bit permyriad to percent with 100 / 23.4 / 3.45 format
|
||||
const char* permyriadtostr4(const uint16_t xx) {
|
||||
if (xx >= 10000)
|
||||
return "100";
|
||||
return " 100"; // space to keep 4-width alignment
|
||||
else if (xx >= 1000) {
|
||||
conv[3] = DIGIMOD(xx, 1000);
|
||||
conv[4] = DIGIMOD(xx, 100);
|
||||
@@ -84,12 +84,6 @@ const char* i8tostr3rj(const int8_t x) {
|
||||
conv[6] = DIGIMOD(xx, 10);
|
||||
return &conv[3];
|
||||
}
|
||||
else if (xx % 100 == 0) {
|
||||
conv[4] = ' ';
|
||||
conv[5] = RJDIGIT(xx, 1000);
|
||||
conv[6] = DIGIMOD(xx, 100);
|
||||
return &conv[4];
|
||||
}
|
||||
else {
|
||||
conv[3] = DIGIMOD(xx, 100);
|
||||
conv[4] = '.';
|
||||
|
@@ -75,8 +75,8 @@ struct vector_3 {
|
||||
vector_3 operator-(const vector_3 &v) { return vector_3(x - v.x, y - v.y, z - v.z); }
|
||||
vector_3 operator*(const float &v) { return vector_3(x * v, y * v, z * v); }
|
||||
|
||||
operator xy_float_t() { return xy_float_t({ x, y }); }
|
||||
operator xyz_float_t() { return xyz_float_t({ x, y, z }); }
|
||||
operator xy_float_t() { return xy_float_t({ x OPTARG(HAS_Y_AXIS, y) }); }
|
||||
operator xyz_float_t() { return xyz_float_t({ x OPTARG(HAS_Y_AXIS, y) OPTARG(HAS_Z_AXIS, z) }); }
|
||||
|
||||
void debug(FSTR_P const title);
|
||||
};
|
||||
|
Reference in New Issue
Block a user