Merge upstream changes from Marlin 2.1.2.5

This commit is contained in:
Stefan Kalscheuer
2024-11-23 13:43:26 +01:00
parent c41a85354a
commit c8ff13654b
376 changed files with 4922 additions and 3840 deletions

View File

@@ -31,7 +31,6 @@ def enabled_defines(filepath):
our crude scraping method and the actual compiler output.
We end up with the actual configured state,
better than what the config files say. You can then use the
a decent reflection of all enabled options that (probably) came from
resulting config.ini to produce more exact configuration files.
'''
outdict = {}
@@ -188,7 +187,7 @@ def compute_build_signature(env):
ini_fmt = '{0:40} = {1}'
ext_fmt = '{0:40} {1}'
ignore = ('CONFIGURATION_H_VERSION', 'CONFIGURATION_ADV_H_VERSION', 'CONFIG_EXPORT')
ignore = ('CONFIGURATION_H_VERSION', 'CONFIGURATION_ADV_H_VERSION', 'CONFIG_EXAMPLES_DIR', 'CONFIG_EXPORT')
if extended_dump:
# Extended export will dump config options by section

View File

@@ -0,0 +1,337 @@
/*
pins_arduino.h - Pin definition functions for mega1281
Originally part of Arduino
Copyright (c) 2007 David A. Mellis
Modifications for mega1281 by Lubomir Rintel <lkundrak@v3.sk>
and Minitronics: <https://reprap.org/wiki/File:MinitronicsArduinoAddon.zip>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
*/
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <avr/pgmspace.h>
#define NUM_DIGITAL_PINS 53
#define NUM_ANALOG_INPUTS 8
#define analogInputToDigitalPin(p) ((p < 16) ? (p) + 54 : -1)
#define digitalPinHasPWM(p) (((p) >= 2 && (p) <= 13) || ((p) >= 44 && (p)<= 46))
#define PIN_SPI_SS (9)
#define PIN_SPI_MOSI (11)
#define PIN_SPI_MISO (12)
#define PIN_SPI_SCK (10)
static const uint8_t SS = PIN_SPI_SS;
static const uint8_t MOSI = PIN_SPI_MOSI;
static const uint8_t MISO = PIN_SPI_MISO;
static const uint8_t SCK = PIN_SPI_SCK;
#define PIN_WIRE_SDA (20)
#define PIN_WIRE_SCL (21)
static const uint8_t SDA = PIN_WIRE_SDA;
static const uint8_t SCL = PIN_WIRE_SCL;
#define LED_BUILTIN 46
#define PIN_A0 (46)
#define PIN_A1 (47)
#define PIN_A2 (48)
#define PIN_A3 (49)
#define PIN_A4 (50)
#define PIN_A5 (51)
#define PIN_A6 (52)
#define PIN_A7 (53)
static const uint8_t A0 = PIN_A0;
static const uint8_t A1 = PIN_A1;
static const uint8_t A2 = PIN_A2;
static const uint8_t A3 = PIN_A3;
static const uint8_t A4 = PIN_A4;
static const uint8_t A5 = PIN_A5;
static const uint8_t A6 = PIN_A6;
static const uint8_t A7 = PIN_A7;
// A majority of the pins are NOT PCINTs, SO BE WARNED (i.e. you cannot use them as receive pins)
// Only pins available for RECEIVE (TRANSMIT can be on any pin):
// (I've deliberately left out pin mapping to the Hardware USARTs - seems senseless to me)
// Pins: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
#define digitalPinToPCICR(p) ( (((p) >= 10) && ((p) <= 13)) || \
(((p) >= 50) && ((p) <= 53)) || \
(((p) >= 62) && ((p) <= 69)) ? (&PCICR) : ((uint8_t *)0) )
#define digitalPinToPCICRbit(p) ( (((p) >= 10) && ((p) <= 13)) || (((p) >= 50) && ((p) <= 53)) ? 0 : \
( (((p) >= 62) && ((p) <= 69)) ? 2 : \
0 ) )
#define digitalPinToPCMSK(p) ( (((p) >= 10) && ((p) <= 13)) || (((p) >= 50) && ((p) <= 53)) ? (&PCMSK0) : \
( (((p) >= 62) && ((p) <= 69)) ? (&PCMSK2) : \
((uint8_t *)0) ) )
#define digitalPinToPCMSKbit(p) ( (((p) >= 10) && ((p) <= 13)) ? ((p) - 6) : \
( ((p) == 50) ? 3 : \
( ((p) == 51) ? 2 : \
( ((p) == 52) ? 1 : \
( ((p) == 53) ? 0 : \
( (((p) >= 62) && ((p) <= 69)) ? ((p) - 62) : \
0 ) ) ) ) ) )
#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : ((p) >= 18 && (p) <= 21 ? 23 - (p) : NOT_AN_INTERRUPT)))
#ifdef ARDUINO_MAIN
const uint16_t PROGMEM port_to_mode_PGM[] = {
NOT_A_PORT,
(uint16_t) &DDRA,
(uint16_t) &DDRB,
(uint16_t) &DDRC,
(uint16_t) &DDRD,
(uint16_t) &DDRE,
(uint16_t) &DDRF,
(uint16_t) &DDRG,
};
const uint16_t PROGMEM port_to_output_PGM[] = {
NOT_A_PORT,
(uint16_t) &PORTA,
(uint16_t) &PORTB,
(uint16_t) &PORTC,
(uint16_t) &PORTD,
(uint16_t) &PORTE,
(uint16_t) &PORTF,
(uint16_t) &PORTG,
};
const uint16_t PROGMEM port_to_input_PGM[] = {
NOT_A_PIN,
(uint16_t) &PINA,
(uint16_t) &PINB,
(uint16_t) &PINC,
(uint16_t) &PIND,
(uint16_t) &PINE,
(uint16_t) &PINF,
(uint16_t) &PING,
};
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
// PORTLIST
// -------------------------------------------
PE , // PE 0 ** 0 ** USART0_RX
PE , // PE 1 ** 1 ** USART0_TX
PE , // PE 4 ** 2 ** PWM0
PE , // PE 5 ** 3 ** PWM1
PG , // PG 5 ** 4 ** PWM2
PE , // PE 3 ** 5 ** PWM3
PB , // PB 4 ** 6 ** PWM4
PB , // PB 5 ** 7 ** PWM5
PB , // PB 6 ** 8 ** PWM6
PB , // PB 7 ** 9 ** PWM7
PB , // PB 1 ** 10 ** SPI_SCK
PB , // PB 2 ** 11 ** SPI_MOSI
PB , // PB 3 ** 12 ** SPI_MISO
PE , // PE 2 ** 13 ** D13
PE , // PE 6 ** 14 ** D14
PE , // PE 7 ** 15 ** D15
PB , // PB 0 ** 16 ** SPI_SS
PD , // PD 0 ** 17 ** I2C_SCL
PD , // PD 1 ** 18 ** I2C_SDA
PD , // PD 2 ** 19 ** D19
PD , // PD 3 ** 20 ** D20
PD , // PD 4 ** 21 ** D21
PD , // PD 5 ** 22 ** D22
PD , // PD 6 ** 23 ** D23
PD , // PD 7 ** 24 ** D24
PG , // PG 0 ** 25 ** D25
PG , // PG 1 ** 26 ** D26
PG , // PG 2 ** 27 ** D27
PG , // PG 3 ** 28 ** D28
PG , // PG 4 ** 29 ** D29
PC , // PC 0 ** 30 ** D30
PC , // PC 1 ** 31 ** D31
PC , // PC 2 ** 32 ** D32
PC , // PC 3 ** 33 ** D33
PC , // PC 4 ** 34 ** D34
PC , // PC 5 ** 35 ** D35
PC , // PC 6 ** 36 ** D36
PC , // PC 7 ** 37 ** D37
PA , // PA 0 ** 38 ** D38
PA , // PA 1 ** 39 ** D39
PA , // PA 2 ** 40 ** D40
PA , // PA 3 ** 41 ** D41
PA , // PA 4 ** 42 ** D42
PA , // PA 5 ** 43 ** D43
PA , // PA 6 ** 44 ** D44
PA , // PA 7 ** 45 ** D45
PF , // PF 0 ** 46 ** A0
PF , // PF 1 ** 47 ** A1
PF , // PF 2 ** 48 ** A2
PF , // PF 3 ** 49 ** A3
PF , // PF 4 ** 50 ** A4
PF , // PF 5 ** 51 ** A5
PF , // PF 6 ** 52 ** A6
PF , // PF 7 ** 53 ** A7
};
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
// PIN IN PORT
// -------------------------------------------
_BV( 0 ) , // PE 0 ** 0 ** USART0_RX
_BV( 1 ) , // PE 1 ** 1 ** USART0_TX
_BV( 4 ) , // PE 4 ** 2 ** PWM0
_BV( 5 ) , // PE 5 ** 3 ** PWM1
_BV( 5 ) , // PG 5 ** 4 ** PWM2
_BV( 3 ) , // PE 3 ** 5 ** PWM3
_BV( 4 ) , // PB 4 ** 6 ** PWM4
_BV( 5 ) , // PB 5 ** 7 ** PWM5
_BV( 6 ) , // PB 6 ** 8 ** PWM6
_BV( 7 ) , // PB 7 ** 9 ** PWM7
_BV( 1 ) , // PB 1 ** 10 ** SPI_SCK
_BV( 2 ) , // PB 2 ** 11 ** SPI_MOSI
_BV( 3 ) , // PB 3 ** 12 ** SPI_MISO
_BV( 2 ) , // PE 2 ** 13 ** D13
_BV( 6 ) , // PE 6 ** 14 ** D14
_BV( 7 ) , // PE 7 ** 15 ** D15
_BV( 0 ) , // PB 0 ** 16 ** SPI_SS
_BV( 0 ) , // PD 0 ** 17 ** I2C_SCL
_BV( 1 ) , // PD 1 ** 18 ** I2C_SDA
_BV( 2 ) , // PD 2 ** 19 ** D19
_BV( 3 ) , // PD 3 ** 20 ** D20
_BV( 4 ) , // PD 4 ** 21 ** D21
_BV( 5 ) , // PA 5 ** 22 ** D22
_BV( 6 ) , // PA 6 ** 23 ** D23
_BV( 7 ) , // PA 7 ** 24 ** D24
_BV( 0 ) , // PG 0 ** 25 ** D25
_BV( 1 ) , // PG 1 ** 26 ** D26
_BV( 2 ) , // PG 2 ** 27 ** D27
_BV( 3 ) , // PG 3 ** 28 ** D28
_BV( 4 ) , // PG 4 ** 29 ** D29
_BV( 0 ) , // PC 0 ** 30 ** D30
_BV( 1 ) , // PC 1 ** 31 ** D31
_BV( 2 ) , // PC 2 ** 32 ** D32
_BV( 3 ) , // PC 3 ** 33 ** D33
_BV( 4 ) , // PC 4 ** 34 ** D34
_BV( 5 ) , // PC 5 ** 35 ** D35
_BV( 6 ) , // PC 6 ** 36 ** D36
_BV( 7 ) , // PC 7 ** 37 ** D37
_BV( 0 ) , // PA 0 ** 38 ** D38
_BV( 1 ) , // PA 1 ** 39 ** D39
_BV( 2 ) , // PA 2 ** 40 ** D40
_BV( 3 ) , // PA 3 ** 41 ** D41
_BV( 4 ) , // PA 4 ** 42 ** D42
_BV( 5 ) , // PA 5 ** 43 ** D43
_BV( 6 ) , // PA 6 ** 44 ** D44
_BV( 7 ) , // PA 7 ** 45 ** D45
_BV( 0 ) , // PF 0 ** 46 ** A0
_BV( 1 ) , // PF 1 ** 47 ** A1
_BV( 2 ) , // PF 2 ** 48 ** A2
_BV( 3 ) , // PF 3 ** 49 ** A3
_BV( 4 ) , // PF 4 ** 50 ** A4
_BV( 5 ) , // PF 5 ** 51 ** A5
_BV( 6 ) , // PF 6 ** 52 ** A6
_BV( 7 ) , // PF 7 ** 53 ** A7
};
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
// TIMERS
// -------------------------------------------
NOT_ON_TIMER , // PE 0 ** 0 ** USART0_RX
NOT_ON_TIMER , // PE 1 ** 1 ** USART0_TX
TIMER3B , // PE 4 ** 2 ** PWM0
TIMER3C , // PE 5 ** 3 ** PWM1
TIMER0B , // PG 5 ** 4 ** PWM2
TIMER3A , // PE 3 ** 5 ** PWM3
TIMER2A , // PB 4 ** 6 ** PWM4
TIMER1A , // PB 5 ** 7 ** PWM5
TIMER1B , // PB 6 ** 8 ** PWM6
TIMER0A , // PB 7 ** 9 ** PWM7
NOT_ON_TIMER , // PB 1 ** 10 ** SPI_SCK
NOT_ON_TIMER , // PB 2 ** 11 ** SPI_MOSI
NOT_ON_TIMER , // PB 3 ** 12 ** SPI_MISO
NOT_ON_TIMER , // PE 2 ** 13 ** D13
NOT_ON_TIMER , // PE 6 ** 14 ** D14
NOT_ON_TIMER , // PE 7 ** 15 ** D15
NOT_ON_TIMER , // PB 0 ** 16 ** SPI_SS
NOT_ON_TIMER , // PD 0 ** 17 ** I2C_SCL
NOT_ON_TIMER , // PD 1 ** 18 ** I2C_SDA
NOT_ON_TIMER , // PD 2 ** 19 ** D19
NOT_ON_TIMER , // PD 3 ** 20 ** D20
NOT_ON_TIMER , // PD 4 ** 21 ** D21
NOT_ON_TIMER , // PA 5 ** 22 ** D22
NOT_ON_TIMER , // PA 6 ** 23 ** D23
NOT_ON_TIMER , // PA 7 ** 24 ** D24
NOT_ON_TIMER , // PG 0 ** 25 ** D25
NOT_ON_TIMER , // PG 1 ** 26 ** D26
NOT_ON_TIMER , // PG 2 ** 27 ** D27
NOT_ON_TIMER , // PG 3 ** 28 ** D28
NOT_ON_TIMER , // PG 4 ** 29 ** D29
NOT_ON_TIMER , // PC 0 ** 30 ** D30
NOT_ON_TIMER , // PC 1 ** 31 ** D31
NOT_ON_TIMER , // PC 2 ** 32 ** D32
NOT_ON_TIMER , // PC 3 ** 33 ** D33
NOT_ON_TIMER , // PC 4 ** 34 ** D34
NOT_ON_TIMER , // PC 5 ** 35 ** D35
NOT_ON_TIMER , // PC 6 ** 36 ** D36
NOT_ON_TIMER , // PC 7 ** 37 ** D37
NOT_ON_TIMER , // PA 0 ** 38 ** D38
NOT_ON_TIMER , // PA 1 ** 39 ** D39
NOT_ON_TIMER , // PA 2 ** 40 ** D40
NOT_ON_TIMER , // PA 3 ** 41 ** D41
NOT_ON_TIMER , // PA 4 ** 42 ** D42
NOT_ON_TIMER , // PA 5 ** 43 ** D43
NOT_ON_TIMER , // PA 6 ** 44 ** D44
NOT_ON_TIMER , // PA 7 ** 45 ** D45
NOT_ON_TIMER , // PF 0 ** 46 ** A0
NOT_ON_TIMER , // PF 1 ** 47 ** A1
NOT_ON_TIMER , // PF 2 ** 48 ** A2
NOT_ON_TIMER , // PF 3 ** 49 ** A3
NOT_ON_TIMER , // PF 4 ** 50 ** A4
NOT_ON_TIMER , // PF 5 ** 51 ** A5
NOT_ON_TIMER , // PF 6 ** 52 ** A6
NOT_ON_TIMER , // PF 7 ** 53 ** A7
};
#endif
// These serial port names are intended to allow libraries and architecture-neutral
// sketches to automatically default to the correct port name for a particular type
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
//
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
//
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
//
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
//
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
//
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
// pins are NOT connected to anything by default.
#define SERIAL_PORT_MONITOR Serial
#define SERIAL_PORT_HARDWARE Serial
#define SERIAL_PORT_HARDWARE1 Serial1
#define SERIAL_PORT_HARDWARE2 Serial2
#define SERIAL_PORT_HARDWARE_OPEN Serial1
#define SERIAL_PORT_HARDWARE_OPEN1 Serial2
#endif

View File

@@ -20,7 +20,7 @@ cmake_minimum_required(VERSION 3.5)
# and add the path to the module path #
#====================================================================#
set(SCRIPT_BRANCH 1.0.2) #Set to wanted marlin-cmake release tag or branch
set(SCRIPT_BRANCH 1.0.2) # Set to wanted marlin-cmake release tag or branch
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake)
@@ -88,7 +88,7 @@ file(WRITE "${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/Platform/Arduino.cmake" "${NE
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/modules)
#====================================================================#
# Custom path to Arduino SDK can be set here. #
# Custom path to Arduino SDK can be set here #
# It can also be set from command line. eg.: #
# cmake .. -DARDUINO_SDK_PATH="/path/to/arduino-1.x.x" #
#====================================================================#
@@ -113,14 +113,14 @@ set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/toolchain/Arduin
# If you receive this error: #
# 'Unknown CMake command "_cmake_record_install_prefix".' #
# #
# Go to the file in your CMake directory. #
# Go to the file in your CMake directory #
# #
# For Windows: cmake\Modules\Platform\WindowsPaths.cmake #
# For Linux: cmake/Modules/Platform/UnixPaths.cmake #
# #
# Comment out "_cmake_record_install_prefix()" #
# - OR - #
# Add "include(CMakeSystemSpecificInformation)" above the line. #
# Add "include(CMakeSystemSpecificInformation)" above the line #
# #
#====================================================================#
project(Marlin C CXX)

View File

@@ -1,69 +1,69 @@
/*
general font collections
http://www.smashingmagazine.com/2007/11/08/40-excellent-freefonts-for-professional-design/
http://techmagazine.ws/most-popular-free-quality-fonts/
http://openfontlibrary.org/
https://www.smashingmagazine.com/2007/11/08/40-excellent-freefonts-for-professional-design/
https://techmagazine.ws/most-popular-free-quality-fonts/
https://openfontlibrary.org/
bitmap font collections
http://www.orgdot.com/aliasfonts/ (includes links)
http://www.04.jp.org/
http://www.miniml.com
http://www.fontspace.com/010bus
https://www.orgdot.com/aliasfonts/ (includes links)
https://www.04.jp.org/
https://www.miniml.com
https://www.fontspace.com/010bus
http://en.wikipedia.org/wiki/Unicode_typeface
https://en.wikipedia.org/wiki/Unicode_typeface
da könnten auch ein paar fonts dabei sein, die die m2tklib sonderzeichen beinhalten:
Caslon Roman http://en.wikipedia.org/wiki/Caslon_Roman
Charis Sil http://en.wikipedia.org/wiki/Charis_SIL
DejaVu Sans http://en.wikipedia.org/wiki/DejaVu_fonts
Doulos http://en.wikipedia.org/wiki/Doulos_SIL
Free Serif http://en.wikipedia.org/wiki/FreeSerif http://ftp.gnu.org/gnu/freefont/
Caslon Roman https://en.wikipedia.org/wiki/Caslon_Roman
Charis Sil https://en.wikipedia.org/wiki/Charis_SIL
DejaVu Sans https://en.wikipedia.org/wiki/DejaVu_fonts
Doulos https://en.wikipedia.org/wiki/Doulos_SIL
Free Serif https://en.wikipedia.org/wiki/FreeSerif https://ftp.gnu.org/gnu/freefont/
--> keine box, aber es gibt pfeile/invertierte pfeile und kreise für m2tklib
Gentium Plus ???? http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=Gentium_download#02b091ae
Gentium Plus ???? https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=Gentium_download#02b091ae
--> keine graphic
GNU Unifont http://en.wikipedia.org/wiki/GNU_Unifont, http://unifoundry.com/unifont.html
GNU Unifont https://en.wikipedia.org/wiki/GNU_Unifont, https://unifoundry.com/unifont.html
Titus cyberbit Basic http://en.wikipedia.org/wiki/TITUS_Cyberbit_Basic
Titus cyberbit Basic https://en.wikipedia.org/wiki/TITUS_Cyberbit_Basic
fonts
Gentium
http://openfontlibrary.org/font/gentium
https://openfontlibrary.org/font/gentium
license: OFL
Old-Standard
http://openfontlibrary.org/font/old-standard
https://openfontlibrary.org/font/old-standard
license: OFL
Hanuman
http://openfontlibrary.org/font/hanumanb
https://openfontlibrary.org/font/hanumanb
license: OFL
FreeUniversal
http://openfontlibrary.org/font/freeuniversal
https://openfontlibrary.org/font/freeuniversal
license: OFL
FriendShip-Code <--- nicht so sicher...
http://openfontlibrary.org/font/friendship-code
https://openfontlibrary.org/font/friendship-code
license: CC-BY-SA
LinuxLibertine
http://de.wikipedia.org/wiki/Linux_Libertine
http://sourceforge.net/projects/linuxlibertine/files/linuxlibertine/5.1.3-2/
https://de.wikipedia.org/wiki/Linux_Libertine
https://sourceforge.net/projects/linuxlibertine/files/linuxlibertine/5.1.3-2/
license: OFL
DidactGothic
source: http://openfontlibrary.org/
source: https://openfontlibrary.org/
judson
source: http://openfontlibrary.org/
source: https://openfontlibrary.org/
unicons
source: http://openfontlibrary.org/
source: https://openfontlibrary.org/
license: OFL
suggested pt: 26, 30
org_V01, fixed_V0
source: http://www.orgdot.com/aliasfonts/
source: https://www.orgdot.com/aliasfonts/
license: open source, individual, cite required
suggested pt: 8
04b_03b.zip 04b_03.zip 04b_09.zip 04b_11.zip 04b_19.zip 04b_21.zip 04b_25.zip 04b_30.zip
source: http://www.04.jp.org/
source: https://www.04.jp.org/
license: "Freeware: You may use them as you like"
7px4bus
source: http://www.fontspace.com/010bus
source: https://www.fontspace.com/010bus
license: Licensed as: Freeware, Commercial use allowed!
suggested 7pt
8pxbus
source: http://www.fontspace.com/010bus
source: https://www.fontspace.com/010bus
license: Licensed as: Freeware, Commercial use allowed!
suggested 8pt
@@ -1090,23 +1090,23 @@ void bdf_WriteC(const char *outname, const char *fontname) {
capital_ascent = bdf_capital_A_height > 0 ? bdf_capital_A_height : bdf_capital_1_height;
fprintf(out_fp, "/*\n");
fprintf(out_fp, " Fontname: %s\n", bdf_font);
fprintf(out_fp, " Copyright: %s\n", bdf_copyright);
fprintf(out_fp, " Capital A Height: %d, '1' Height: %d\n", bdf_capital_A_height, bdf_capital_1_height);
fprintf(out_fp, " Calculated Max Values w=%2d h=%2d x=%2d y=%2d dx=%2d dy=%2d ascent=%2d len=%2d\n",
fprintf(out_fp, "/**\n");
fprintf(out_fp, " * Fontname: %s\n", bdf_font);
fprintf(out_fp, " * Copyright: %s\n", bdf_copyright);
fprintf(out_fp, " * Capital A Height: %d, '1' Height: %d\n", bdf_capital_A_height, bdf_capital_1_height);
fprintf(out_fp, " * Calculated Max Values w=%2d h=%2d x=%2d y=%2d dx=%2d dy=%2d ascent=%2d len=%2d\n",
bdf_char_max_width, bdf_char_max_height, bdf_char_max_x, bdf_char_max_y, bdf_delta_max_x, bdf_delta_max_y,
bdf_char_max_ascent, bdf_glyph_data_max_len);
fprintf(out_fp, " Font Bounding box w=%2d h=%2d x=%2d y=%2d\n",
fprintf(out_fp, " * Font Bounding box w=%2d h=%2d x=%2d y=%2d\n",
bdf_font_width, bdf_font_height, bdf_font_x, bdf_font_y);
fprintf(out_fp, " Calculated Min Values x=%2d y=%2d dx=%2d dy=%2d\n",
fprintf(out_fp, " * Calculated Min Values x=%2d y=%2d dx=%2d dy=%2d\n",
bdf_char_min_x, bdf_char_min_y, bdf_delta_min_x, bdf_delta_min_y);
fprintf(out_fp, " Pure Font ascent =%2d descent=%2d\n", capital_ascent, bdf_lower_g_descent);
fprintf(out_fp, " X Font ascent =%2d descent=%2d\n", bdf_char_xascent, bdf_char_xdescent);
fprintf(out_fp, " Max Font ascent =%2d descent=%2d\n", bdf_char_max_ascent, bdf_char_min_y);
fprintf(out_fp, " * Pure Font ascent =%2d descent=%2d\n", capital_ascent, bdf_lower_g_descent);
fprintf(out_fp, " * X Font ascent =%2d descent=%2d\n", bdf_char_xascent, bdf_char_xdescent);
fprintf(out_fp, " * Max Font ascent =%2d descent=%2d\n", bdf_char_max_ascent, bdf_char_min_y);
fprintf(out_fp, "*/\n");
fprintf(out_fp, " */\n");
fprintf(out_fp, "const u8g_fntpgm_uint8_t %s[%d] U8G_FONT_SECTION(\"%s\") = {\n", fontname, data_pos, fontname);
fprintf(out_fp, " ");
data_Write(out_fp, " ");

View File

@@ -103,7 +103,7 @@ At this time, the font file `marlin-6x12-3.bdf` is used to generate the font dat
Documents related to the old version of the language engine:
- [Marlin Fonts Documentation](https://www.marlinfw.org/docs/development/fonts.html)
- [Marlin Fonts Documentation](https://marlinfw.org/docs/development/fonts.html)
- [Marlin LCD Language](https://marlinfw.org/docs/development/lcd_language.html)
- [U8GLIB](https://github.com/olikraus/u8glib.git)
- [UTF-8 for U8GLIB](https://github.com/yhfudev/u8glib-fontutf8.git)

View File

@@ -1,173 +0,0 @@
#!/usr/bin/env bash
#
# mfconfig init source dest
# mfconfig manual source dest
#
# The MarlinFirmware/Configurations layout could be broken up into branches,
# but this makes management more complicated and requires more commits to
# perform the same operation, so this uses a single branch with subfolders.
#
# init - Initialize the repo with a base commit and changes:
# - Source will be an 'import' branch containing all current configs.
# - Create an empty 'BASE' branch from 'init-repo'.
# - Add Marlin config files, but reset all to defaults.
# - Commit this so changes will be clear in following commits.
# - Add changed Marlin config files and commit.
#
# manual - Manually import changes from the Marlin repo
# - Replace 'default' configs with those from the Marlin repo.
# - Wait for manual propagation to the rest of the configs.
# - Run init with the given 'source' and 'dest'
#
REPOHOME="`dirname ~/Projects/Maker/Firmware/.`"
MARLINREPO="$REPOHOME/MarlinFirmware"
CONFIGREPO="$REPOHOME/Configurations"
CEXA=config/examples
CDEF=config/default
BC=Configuration.h
AC=Configuration_adv.h
COMMIT_STEPS=0
#cd "$CONFIGREPO" 2>/dev/null || { echo "Can't find Configurations repo!" ; exit 1; }
ACTION=${1:-init}
IMPORT=${2:-"import-2.1.x"}
EXPORT=${3:-"bugfix-2.1.x"}
echo -n "Doing grhh ... " ; grhh ; echo
if [[ $ACTION == "manual" ]]; then
#
# Copy the latest default configs from MarlinFirmware/Marlin
# or one of the import branches here, then use them to construct
# a 'BASE' branch with only defaults as a starting point.
#
echo "- Updating '$IMPORT' from Marlin..."
git checkout $IMPORT || exit
# Reset from the latest complete state
#git reset --hard bugfix-2.1.x
cp "$MARLINREPO/Marlin/"Configuration*.h "$CDEF/"
#git add . && git commit -m "Changes from Marlin ($(date '+%Y-%m-%d %H:%M'))."
echo "- Fix up the import branch and come back."
read -p "- Ready to init [y/N] ?" INIT_YES
echo
[[ $INIT_YES == 'Y' || $INIT_YES == 'y' ]] || { echo "Done." ; exit ; }
ACTION='init'
fi
if [[ $ACTION == "init" ]]; then
#
# Copy all configs from a source such as MarlinFirmware/Marlin
# or one of the import branches here, then use them to construct
# a 'BASE' branch with only defaults as a starting point.
#
SED=$(which gsed sed | head -n1)
echo "- Initializing BASE branch..."
# Use the import branch as the source
git checkout $IMPORT || exit
# Copy to a temporary location
TEMP=$( mktemp -d ) ; cp -R config $TEMP
# Strip all #error lines
IFS=$'\n'; set -f
for fn in $( find $TEMP/config -type f -name "Configuration.h" ); do
$SED -i~ -e "20,30{/#error/d}" "$fn"
rm "$fn~"
done
unset IFS; set +f
# Make sure we're not on the 'BASE' branch...
git checkout init-repo >/dev/null 2>&1 || exit
# Create 'BASE' as a copy of 'init-repo' (README, LICENSE, etc.)
git branch -D BASE 2>/dev/null
git checkout init-repo -b BASE || exit
# Copy all config files into place
echo "- Copying all configs from fresh $IMPORT..."
cp -R "$TEMP/config" .
# Delete anything that's not a Configuration file
find config -type f \! -name "Configuration*" -exec rm "{}" \;
# DEBUG: Commit the original config files for comparison
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Commit for comparison" >/dev/null
# Init Cartesian/SCARA/TPARA configurations to default
echo "- Initializing configs to default state..."
find "$CEXA" -name $BC -print0 \
| while read -d $'\0' F ; do cp "$CDEF/$BC" "$F" ; done
find "$CEXA" -name $AC -print0 \
| while read -d $'\0' F ; do cp "$CDEF/$AC" "$F" ; done
# DEBUG: Commit the reset for review
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset configs..." >/dev/null
# Update the %VERSION% in the README.md file
VERS=$( echo $EXPORT | $SED 's/release-//' )
eval "${SED} -E -i~ -e 's/%VERSION%/$VERS/g' README.md"
rm -f README.md~
# NOT DEBUGGING: Commit the 'BASE', ready for customizations
((COMMIT_STEPS)) || git add . >/dev/null && git commit --amend --no-edit >/dev/null
# Create a new branch from 'BASE' for the final result
echo "- Creating '$EXPORT' branch for the result..."
git branch -D $EXPORT 2>/dev/null
git checkout -b $EXPORT || exit
# Delete temporary branch
git branch -D BASE 2>/dev/null
echo "- Applying example config customizations..."
cp -R "$TEMP/config" .
find config -type f \! -name "Configuration*" -exec rm "{}" \;
addpathlabels() {
find config -name "Conf*.h" -print0 | while read -d $'\0' fn ; do
fldr=$(dirname "$fn")
blank_line=$(awk '/^\s*$/ {print NR; exit}' "$fn")
$SED -i~ "${blank_line}i\\\n#define CONFIG_EXAMPLES_DIR \"$fldr\"" "$fn"
rm -f "$fn~"
done
}
echo "- Adding path labels to all configs..."
addpathlabels
git add . >/dev/null && git commit -m "Examples Customizations" >/dev/null
echo "- Copying extras from Marlin..."
cp -R "$TEMP/config" .
# Apply labels again!
addpathlabels
git add . >/dev/null && git commit -m "Examples Extras" >/dev/null
rm -rf $TEMP
git push -f --set-upstream upstream "$EXPORT"
else
echo "Usage: mfconfig init|manual|rebase"
fi

View File

@@ -40,7 +40,6 @@ Modify Configuration.h / Configuration_adv.h:
Modify pins files:
pins_set ............. Set the value of a pin in a pins file
pinsformat.js ........ Node.js script to format pins files
pinsformat.py ........ Python script to format pins files
THIS

View File

@@ -9,7 +9,6 @@
# so at every release be sure to create a dev- tag and publish it to origin.
#
SED=$(which gsed sed | head -n1)
SELF=`basename "$0"`
DRYRUN=0
@@ -36,10 +35,10 @@ TMPF="$TMPDIR/tmp.txt"
SCRF="$TMPDIR/update-$DEST.sh"
git checkout bugfix-2.1.x
git log --pretty="[%h] %s" dev-$TAG1..$TAG2 | grep -v '\[cron\]' | $SED '1!G;h;$!d' >"$LOGB"
git log --pretty="[%h] %s" dev-$TAG1..$TAG2 | grep -v '\[cron\]' | sed '1!G;h;$!d' >"$LOGB"
git checkout $DEST
git log --pretty="[%h] %s" $TAG1..$TAG2 | $SED '1!G;h;$!d' >"$LOG2" || { echo "Can't find tag dev-$TAG1" ; exit 1 ; }
git log --pretty="[%h] %s" $TAG1..$TAG2 | sed '1!G;h;$!d' >"$LOG2" || { echo "Can't find tag dev-$TAG1" ; exit 1 ; }
# Go through commit text from DEST removing all matches from the bugfix log
@@ -57,7 +56,7 @@ cat "$LOG2" | while read line; do
#echo "... $PATT"
[[ -n "$PATT" ]] && { grep -vE "$PATT" "$LOGB" >"$TMPF" ; cp "$TMPF" "$LOGB" ; }
else
PATT=$( $SED -E 's/^\[[0-9a-f]{10}\]( . )?(.+)$/\2/' <<<"$line" )
PATT=$( sed -E 's/^\[[0-9a-f]{10}\]( . )?(.+)$/\2/' <<<"$line" )
[[ -n "$PATT" ]] && { grep -v "$PATT" "$LOGB" >"$TMPF" ; cp "$TMPF" "$LOGB" ; }
fi
done

View File

@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<!--
Graphic designed by Ahmnet Cem TURAN
URL: https://github.com/ahmetcemturan
License: CC-BY-NC-SA
-->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
@@ -19,10 +22,8 @@
inkscape:export-filename="C:\Users\jbrazio\Desktop\marlin-old.png"
inkscape:export-xdpi="27"
inkscape:export-ydpi="27">
<title
id="title3362">Marlin Firmware</title>
<defs
id="defs3361" />
<title id="title3362">Marlin Firmware</title>
<defs id="defs3361" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
@@ -41,66 +42,64 @@
inkscape:window-x="365"
inkscape:window-y="46"
inkscape:window-maximized="0" />
<metadata
id="metadata3364">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Marlin Firmware</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Ahmet Cem TURAN</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>MarlinFirmware</dc:title>
</cc:Agent>
</dc:rights>
<dc:publisher>
<cc:Agent>
<dc:title>João Brázio</dc:title>
</cc:Agent>
</dc:publisher>
<dc:identifier>marlin-logo-old</dc:identifier>
</cc:Work>
</rdf:RDF>
<metadata>
<creator>Ahmnet Cem TURAN</creator>
<url>https://github.com/ahmetcemturan</url>
<license>CC-BY-NC-SA</license>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-308.26772)">
<g
id="g3335"
transform="matrix(1.2688266,0,0,1.2688266,0.33525798,503.35041)">
<path
id="path3337"
d="m 364.271,4.24 -312.9,0.26 -7,2.33 c -21.42,7.13 -38.03,25.09 -42.99,46.47 -1.37,5.89 -1.53,17.24 -1.29,88.98 0.28,81.931 0.29,82.24 2.5,88.74 6.46,18.97 21.811,34.33 40.7,40.74 l 8.08,2.739 360,0.28 c 330.609,0.25 360.609,0.14 367.5,-1.37 24.069,-5.26 42.26,-22.859 48.46,-46.869 1.22,-4.74 1.54,-12.301 1.54,-36.91 0,-30.881 -0.006,-185.553 -0.006,-185.553 0,0 -152.264,-0.097 -464.594,0.163 z m 388.85,76.75 68.75,69.771 -0.011,33.87 c -0.02,37.899 -0.5,41.85 -6.529,53.32 -6.57,12.51 -19.25,23.039 -32.92,27.329 l -7.04,2.22 -361.5,0 -361.5,0 -6.5,-2.34 c -17.34,-6.229 -30.4,-19.24 -36.22,-36.05 l -2.28,-6.61 0,-83 0,-83 2.31,-6.69 c 6.78,-19.62 24.62,-34.88 44.13,-37.75 3.061,-0.45 146.19,-0.82 318.061,-0.82 l 312.5,-0.01 68.749,69.76 z"
inkscape:connector-curvature="0" />
<path
id="path3339"
d="m 540.871,119.04 c 0,57.4 0.229,68.15 1.59,74.75 4.97,24.069 21.26,37.209 46.149,37.209 l 8.311,0 -0.271,-14.629 -0.279,-14.631 -5.421,-0.439 c -6.039,-0.48 -9.51,-1.961 -12.76,-5.45 -4.87,-5.229 -4.8,-4.19 -5.109,-76.1 l -0.3,-67.75 -15.96,0 -15.949,0 0,67.04 z"
inkscape:connector-curvature="0" />
<path
id="path3341"
d="m 96.871,61.58 c -16.21,4.25 -30.58,15.65 -37.42,29.66 -6.641,13.59 -6.58,12.86 -6.58,77.82 0,55.529 0.1,58.72 1.83,60.29 1.52,1.37 4.22,1.649 16,1.649 l 14.17,0 0.01,-58.75 c 0,-37.39 0.38,-60.1 1.04,-62.47 2.66,-9.58 13.22,-17.63 24.31,-18.52 12.82,-1.03 23.841,5.09 28.75,15.95 l 2.391,5.29 0.29,59.25 0.3,59.25 15.95,0 15.96,0 0,-57.819 c 0,-63.17 0.05,-63.81 5.819,-71.77 3.94,-5.44 11.851,-9.53 19.62,-10.16 12.36,-0.99 22.79,4.57 28.351,15.11 l 2.71,5.14 0.29,59.75 0.279,59.75 15.971,0 15.96,0 0,-59.34 c 0,-55.37 -0.13,-59.85 -1.931,-66.89 C 257.952,93.08 253.622,85.52 244.981,76.9 233.152,65.1 220.402,60 202.691,60 c -16.14,0 -27.949,4.52 -39.109,14.95 l -6.391,5.98 -2.18,-2.96 c -3.8,-5.14 -15.83,-12.79 -24.359,-15.48 -6.351,-2.01 -9.86,-2.479 -18.08,-2.42 -5.611,0.03 -12.67,0.71 -15.701,1.51 z"
inkscape:connector-curvature="0" />
<path
id="path3343"
d="m 612.891,61.7 c -1.91,0.99 -4.5,3.33 -5.75,5.2 -2.04,3.05 -2.27,4.59 -2.27,15.25 l 0,11.85 16,0 16,0 0,-10.53 c 0,-11.8 -1.051,-15.37 -5.881,-19.91 -4.029,-3.79 -12.659,-4.68 -18.099,-1.86 z"
inkscape:connector-curvature="0" />
<path
id="path3345"
d="m 314.871,106.34 c -10.95,3.26 -17.54,7.22 -26.09,15.66 -8.91,8.79 -14.74,19.339 -17.471,31.621 -2.46,11.06 -1.59,26.26 2.07,36.379 5.53,15.24 16.53,27.931 29.99,34.57 9.78,4.83 18.38,6.391 35.25,6.41 l 14.25,0.02 0,-15.379 0,-15.391 -13.25,-0.4 c -11.601,-0.359 -13.94,-0.729 -18.8,-2.97 -7.62,-3.521 -12.37,-7.97 -15.66,-14.68 -2.391,-4.86 -2.79,-6.9 -2.79,-14.181 0,-7.27 0.399,-9.319 2.78,-14.16 3.38,-6.889 9.229,-12.93 15.529,-16.029 6.66,-3.28 19.771,-3.28 25.98,0 6.12,3.24 11.99,9.49 15.06,16.04 l 2.65,5.649 0.3,35.75 0.29,35.75 44.96,0 44.95,0 0.02,-39.25 c 0.03,-44.39 -0.01,-44.18 7.84,-50.899 11.42,-9.78 29.91,-7.05 36.24,5.34 1.27,2.5 2.29,6.92 2.63,11.44 l 0.561,7.369 15.85,0 15.86,0 0,-6.84 c 0,-8.149 -2.98,-20.56 -6.771,-28.14 -5.63,-11.29 -18.86,-21.31 -32.32,-24.48 -7.54,-1.78 -22.6,-2 -30.109,-0.44 -14.79,3.06 -29.391,14.09 -35.601,26.9 -5.58,11.49 -6.199,15.83 -6.199,43.21 l 0,24.791 -13,0 -13,0 0,-20.34 c 0,-16.97 -0.33,-21.619 -1.97,-28.05 -5.82,-22.75 -23.29,-40.45 -45.49,-46.09 -9.088,-2.32 -25.309,-1.93 -34.539,0.82 z"
inkscape:connector-curvature="0" />
<path
id="path3347"
d="m 705.081,105.56 c -18.091,4.86 -31.98,18.26 -37.771,36.439 -1.439,4.5 -1.84,10.381 -2.189,32.25 l -0.44,26.75 -13.91,0 -13.899,0 0,-47 0,-47 -16,0 -16,0 0,62 0,62 46,0 46,0 0,-36.449 c 0,-22.16 0.42,-38.41 1.069,-41.45 1.38,-6.431 5.771,-12.45 11.17,-15.31 3.391,-1.79 5.9,-2.26 12.261,-2.27 10.569,-0.03 16.04,2.91 19.899,10.66 l 2.601,5.21 0,39.811 0,39.799 13.89,0 c 12.189,0 14.18,-0.229 16.25,-1.91 l 2.36,-1.92 -0.011,-38.83 c 0,-33.729 -0.229,-39.67 -1.739,-45.129 -2.94,-10.681 -6.641,-17.25 -13.671,-24.28 -10.8,-10.79 -22.069,-14.98 -40.039,-14.86 -5.801,0.029 -12.922,0.699 -15.831,1.489 z"
inkscape:connector-curvature="0" />
</g>
<metadata id="metadata3364">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Marlin Firmware</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Ahmet Cem TURAN</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>MarlinFirmware</dc:title>
</cc:Agent>
</dc:rights>
<dc:publisher>
<cc:Agent>
<dc:title>João Brázio</dc:title>
</cc:Agent>
</dc:publisher>
<dc:identifier>marlin-logo-old</dc:identifier>
</cc:Work>
</rdf:RDF>
</metadata>
<g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-308.26772)">
<g id="g3335" transform="matrix(1.2688266,0,0,1.2688266,0.33525798,503.35041)">
<path
id="path3337"
d="m 364.271,4.24 -312.9,0.26 -7,2.33 c -21.42,7.13 -38.03,25.09 -42.99,46.47 -1.37,5.89 -1.53,17.24 -1.29,88.98 0.28,81.931 0.29,82.24 2.5,88.74 6.46,18.97 21.811,34.33 40.7,40.74 l 8.08,2.739 360,0.28 c 330.609,0.25 360.609,0.14 367.5,-1.37 24.069,-5.26 42.26,-22.859 48.46,-46.869 1.22,-4.74 1.54,-12.301 1.54,-36.91 0,-30.881 -0.006,-185.553 -0.006,-185.553 0,0 -152.264,-0.097 -464.594,0.163 z m 388.85,76.75 68.75,69.771 -0.011,33.87 c -0.02,37.899 -0.5,41.85 -6.529,53.32 -6.57,12.51 -19.25,23.039 -32.92,27.329 l -7.04,2.22 -361.5,0 -361.5,0 -6.5,-2.34 c -17.34,-6.229 -30.4,-19.24 -36.22,-36.05 l -2.28,-6.61 0,-83 0,-83 2.31,-6.69 c 6.78,-19.62 24.62,-34.88 44.13,-37.75 3.061,-0.45 146.19,-0.82 318.061,-0.82 l 312.5,-0.01 68.749,69.76 z"
inkscape:connector-curvature="0" />
<path
id="path3339"
d="m 540.871,119.04 c 0,57.4 0.229,68.15 1.59,74.75 4.97,24.069 21.26,37.209 46.149,37.209 l 8.311,0 -0.271,-14.629 -0.279,-14.631 -5.421,-0.439 c -6.039,-0.48 -9.51,-1.961 -12.76,-5.45 -4.87,-5.229 -4.8,-4.19 -5.109,-76.1 l -0.3,-67.75 -15.96,0 -15.949,0 0,67.04 z"
inkscape:connector-curvature="0" />
<path
id="path3341"
d="m 96.871,61.58 c -16.21,4.25 -30.58,15.65 -37.42,29.66 -6.641,13.59 -6.58,12.86 -6.58,77.82 0,55.529 0.1,58.72 1.83,60.29 1.52,1.37 4.22,1.649 16,1.649 l 14.17,0 0.01,-58.75 c 0,-37.39 0.38,-60.1 1.04,-62.47 2.66,-9.58 13.22,-17.63 24.31,-18.52 12.82,-1.03 23.841,5.09 28.75,15.95 l 2.391,5.29 0.29,59.25 0.3,59.25 15.95,0 15.96,0 0,-57.819 c 0,-63.17 0.05,-63.81 5.819,-71.77 3.94,-5.44 11.851,-9.53 19.62,-10.16 12.36,-0.99 22.79,4.57 28.351,15.11 l 2.71,5.14 0.29,59.75 0.279,59.75 15.971,0 15.96,0 0,-59.34 c 0,-55.37 -0.13,-59.85 -1.931,-66.89 C 257.952,93.08 253.622,85.52 244.981,76.9 233.152,65.1 220.402,60 202.691,60 c -16.14,0 -27.949,4.52 -39.109,14.95 l -6.391,5.98 -2.18,-2.96 c -3.8,-5.14 -15.83,-12.79 -24.359,-15.48 -6.351,-2.01 -9.86,-2.479 -18.08,-2.42 -5.611,0.03 -12.67,0.71 -15.701,1.51 z"
inkscape:connector-curvature="0" />
<path
id="path3343"
d="m 612.891,61.7 c -1.91,0.99 -4.5,3.33 -5.75,5.2 -2.04,3.05 -2.27,4.59 -2.27,15.25 l 0,11.85 16,0 16,0 0,-10.53 c 0,-11.8 -1.051,-15.37 -5.881,-19.91 -4.029,-3.79 -12.659,-4.68 -18.099,-1.86 z"
inkscape:connector-curvature="0" />
<path
id="path3345"
d="m 314.871,106.34 c -10.95,3.26 -17.54,7.22 -26.09,15.66 -8.91,8.79 -14.74,19.339 -17.471,31.621 -2.46,11.06 -1.59,26.26 2.07,36.379 5.53,15.24 16.53,27.931 29.99,34.57 9.78,4.83 18.38,6.391 35.25,6.41 l 14.25,0.02 0,-15.379 0,-15.391 -13.25,-0.4 c -11.601,-0.359 -13.94,-0.729 -18.8,-2.97 -7.62,-3.521 -12.37,-7.97 -15.66,-14.68 -2.391,-4.86 -2.79,-6.9 -2.79,-14.181 0,-7.27 0.399,-9.319 2.78,-14.16 3.38,-6.889 9.229,-12.93 15.529,-16.029 6.66,-3.28 19.771,-3.28 25.98,0 6.12,3.24 11.99,9.49 15.06,16.04 l 2.65,5.649 0.3,35.75 0.29,35.75 44.96,0 44.95,0 0.02,-39.25 c 0.03,-44.39 -0.01,-44.18 7.84,-50.899 11.42,-9.78 29.91,-7.05 36.24,5.34 1.27,2.5 2.29,6.92 2.63,11.44 l 0.561,7.369 15.85,0 15.86,0 0,-6.84 c 0,-8.149 -2.98,-20.56 -6.771,-28.14 -5.63,-11.29 -18.86,-21.31 -32.32,-24.48 -7.54,-1.78 -22.6,-2 -30.109,-0.44 -14.79,3.06 -29.391,14.09 -35.601,26.9 -5.58,11.49 -6.199,15.83 -6.199,43.21 l 0,24.791 -13,0 -13,0 0,-20.34 c 0,-16.97 -0.33,-21.619 -1.97,-28.05 -5.82,-22.75 -23.29,-40.45 -45.49,-46.09 -9.088,-2.32 -25.309,-1.93 -34.539,0.82 z"
inkscape:connector-curvature="0" />
<path
id="path3347"
d="m 705.081,105.56 c -18.091,4.86 -31.98,18.26 -37.771,36.439 -1.439,4.5 -1.84,10.381 -2.189,32.25 l -0.44,26.75 -13.91,0 -13.899,0 0,-47 0,-47 -16,0 -16,0 0,62 0,62 46,0 46,0 0,-36.449 c 0,-22.16 0.42,-38.41 1.069,-41.45 1.38,-6.431 5.771,-12.45 11.17,-15.31 3.391,-1.79 5.9,-2.26 12.261,-2.27 10.569,-0.03 16.04,2.91 19.899,10.66 l 2.601,5.21 0,39.811 0,39.799 13.89,0 c 12.189,0 14.18,-0.229 16.25,-1.91 l 2.36,-1.92 -0.011,-38.83 c 0,-33.729 -0.229,-39.67 -1.739,-45.129 -2.94,-10.681 -6.641,-17.25 -13.671,-24.28 -10.8,-10.79 -22.069,-14.98 -40.039,-14.86 -5.801,0.029 -12.922,0.699 -15.831,1.489 z"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!--
Graphic designed by Ahmnet Cem TURAN
URL: https://github.com/ahmetcemturan
License: CC-BY-NC-SA
-->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
@@ -22,11 +25,18 @@
sodipodi:docname="marlin.svg"
inkscape:export-filename="C:\Users\jbrazio\Desktop\marlin.png"
inkscape:export-xdpi="27.424898"
inkscape:export-ydpi="27.424898"><title
id="title3357">Marlin Firmware </title><metadata
id="metadata55"><rdf:RDF><cc:Work
inkscape:export-ydpi="27.424898">
<title id="title3357">Marlin Firmware </title>
<metadata>
<creator>Ahmnet Cem TURAN</creator>
<url>https://github.com/ahmetcemturan</url>
<license>CC-BY-NC-SA</license>
</metadata>
<metadata id="metadata55"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>Marlin Firmware </dc:title><dc:creator><cc:Agent><dc:title>Ahmet Cem TURAN</dc:title></cc:Agent></dc:creator><dc:publisher><cc:Agent><dc:title>João Brázio</dc:title></cc:Agent></dc:publisher><dc:rights><cc:Agent><dc:title>MarlinFirmware</dc:title></cc:Agent></dc:rights><dc:identifier>marlin-logo-new</dc:identifier></cc:Work></rdf:RDF></metadata><defs
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>Marlin Firmware </dc:title><dc:creator><cc:Agent><dc:title>Ahmet Cem TURAN</dc:title></cc:Agent></dc:creator><dc:publisher><cc:Agent><dc:title>João Brázio</dc:title></cc:Agent></dc:publisher><dc:rights><cc:Agent><dc:title>MarlinFirmware</dc:title></cc:Agent></dc:rights><dc:identifier>marlin-logo-new</dc:identifier></cc:Work></rdf:RDF>
</metadata>
<defs
id="defs53" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
@@ -128,4 +138,5 @@
d="M 5.34,951.549 C 5.203,951.512 5.098,951.411 5.054,951.273 5.043,951.239 5.04,951.194 5.037,951.029 l -0.003,-0.203 -0.105,0 -0.106,0 0,0.356 0,0.356 -0.121,0 -0.121,0 0,-0.469 0,-0.469 0.348,0 0.348,0 0,0.276 c 0,0.168 0.003,0.291 0.008,0.314 0.01,0.049 0.044,0.094 0.085,0.116 0.026,0.014 0.045,0.017 0.093,0.017 0.08,0 0.121,-0.022 0.151,-0.081 l 0.02,-0.039 0,-0.301 0,-0.302 0.105,0 c 0.092,0 0.107,0.002 0.123,0.014 l 0.018,0.015 0,0.294 c 0,0.255 -0.002,0.3 -0.013,0.342 -0.022,0.081 -0.05,0.131 -0.103,0.184 -0.082,0.082 -0.167,0.113 -0.303,0.112 -0.045,0 -0.099,-0.006 -0.121,-0.012 z" /></g><path
inkscape:connector-curvature="0"
id="path49"
d="M 403.52901,561.50203" /></g></svg>
d="M 403.52901,561.50203" /></g>
</svg>

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -181,7 +181,7 @@ class Protocol(object):
except ReadTimeout:
self.errors += 1
#print("Packetloss detected..")
except serial.serialutil.SerialException:
except serial.SerialException:
return
self.packet_transit = None
@@ -201,7 +201,7 @@ class Protocol(object):
def transmit_packet(self, packet):
packet = bytearray(packet)
if(self.simulate_errors > 0 and random.random() > (1.0 - self.simulate_errors)):
if (self.simulate_errors > 0 and random.random() > (1.0 - self.simulate_errors)):
if random.random() > 0.9:
#random data drop
start = random.randint(0, len(packet))

View File

@@ -22,7 +22,7 @@ from __future__ import print_function
from __future__ import division
from math import *
import sys,getopt
import sys, getopt
"Constants"
ZERO = 273.15 # zero point of Kelvin scale

View File

@@ -5,7 +5,7 @@ Extract the builds used in Github CI, so that we can run them locally
import yaml
# Set the yaml file to parse
yaml_file = '.github/workflows/test-builds.yml'
yaml_file = '.github/workflows/ci-build-tests.yml'
# Parse the yaml file, and load it into a dictionary (github_configuration)
with open(yaml_file) as f:

View File

@@ -22,43 +22,54 @@
# Generate Marlin TFT Images from bitmaps/PNG/JPG
import sys,struct
import sys, struct
from PIL import Image
def image2bin(image, output_file):
def image2bin(image, output_file, transparency):
w, h = image.size[0], image.size[1]
print(f"Converting image with dimensions {w}x{h}...")
if output_file.endswith(('.c', '.cpp')):
f = open(output_file, 'wt')
is_cpp = True
f.write("const uint16_t image[%d] = {\n" % (image.size[1] * image.size[0]))
row_sp, item_sp = (" ", "") if w >= 480 else (" ", " ")
row_end, data_end = "\n", "};\n"
f = open(output_file, 'wt')
f.write("const uint16_t image[%d] = {\n" % (h * w))
else:
f = open(output_file, 'wb')
is_cpp = False
row_sp, row_end, data_end = b"", b"", b""
f = open(output_file, 'wb')
tcolor, got_tcolor = 0, False
pixs = image.load()
for y in range(image.size[1]):
for x in range(image.size[0]):
for y in range(h):
f.write(row_sp)
for x in range(w):
R = pixs[x, y][0] >> 3
G = pixs[x, y][1] >> 2
B = pixs[x, y][2] >> 3
rgb = (R << 11) | (G << 5) | B
if transparency:
if not got_tcolor:
got_tcolor = True
tcolor = rgb # First pixel color is transparent
if rgb == tcolor: rgb = 1 # "color 1" is transparent
if is_cpp:
strHex = '0x{0:04X}, '.format(rgb)
strHex = item_sp + "0x{0:04X},".format(rgb)
f.write(strHex)
else:
f.write(struct.pack("B", (rgb & 0xFF)))
f.write(struct.pack("B", (rgb >> 8) & 0xFF))
if is_cpp:
f.write("\n")
if is_cpp:
f.write("};\n")
f.write(row_end)
f.write(data_end)
f.close()
if len(sys.argv) <= 2:
print("Utility to export a image in Marlin TFT friendly format.")
print("It will dump a raw bin RGB565 image or create a CPP file with an array of 16 bit image pixels.")
print("Usage: gen-tft-image.py INPUT_IMAGE.(png|bmp|jpg) OUTPUT_FILE.(cpp|bin)")
print("Author: rhapsodyv")
print("Usage: gen-tft-image.py INPUT_IMAGE.(png|bmp|jpg) OUTPUT_FILE.(cpp|bin) [--transparency]")
print("Authors: rhapsodyv, thinkyhead")
exit(1)
transparency = len(sys.argv) > 3 and sys.argv[3] == "--transparency"
output_img = sys.argv[2]
img = Image.open(sys.argv[1])
image2bin(img, output_img)
image2bin(img, output_img, transparency)

View File

@@ -1,20 +1,22 @@
#!/usr/bin/env python3
'''
languageExport.py
languageExport.py [--single]
Export LCD language strings to CSV files for easier translation.
Use importTranslations.py to import CSV into the language files.
Use languageImport.py to import CSV into the language files.
Use --single to export all languages to a single CSV file.
'''
import re
from pathlib import Path
from sys import argv
from languageUtil import namebyid
LANGHOME = "Marlin/src/lcd/language"
# Write multiple sheets if true, otherwise write one giant sheet
MULTISHEET = True
MULTISHEET = '--single' not in argv[1:]
OUTDIR = 'out-csv'
# Check for the path to the language files
@@ -28,7 +30,7 @@ LIMIT = 0
# A dictionary to contain strings for each language.
# Init with 'en' so English will always be first.
language_strings = { 'en': 0 }
language_strings = { 'en': {} }
# A dictionary to contain all distinct LCD string names
names = {}

View File

@@ -17,7 +17,7 @@ TODO: Use the defines and comments above the namespace from existing language fi
"""
import sys, re, requests, csv, datetime
from languageUtil import namebyid
#from languageUtil import namebyid
LANGHOME = "Marlin/src/lcd/language"
OUTDIR = 'out-language'
@@ -76,10 +76,10 @@ for row in reader:
# Add the named string for all the included languages
name = row[0]
for i in range(1, numcols):
str = row[i]
if str:
str_key = row[i]
if str_key:
col = columns[i]
strings_per_lang[col['lang']][col['style']][name] = str
strings_per_lang[col['lang']][col['style']][name] = str_key
# Create a folder for the imported language outfiles
from pathlib import Path
@@ -199,11 +199,11 @@ for i in range(1, numcols):
comm = ''
if lang != 'en' and 'en' in strings_per_lang:
en = strings_per_lang['en']
if name in en[style]: str = en[style][name]
elif name in en['Narrow']: str = en['Narrow'][name]
if str:
if name in en[style]: str_key = en[style][name]
elif name in en['Narrow']: str_key = en['Narrow'][name]
if str_key:
cfmt = '%%%ss// %%s' % (50 - len(val) if len(val) < 50 else 1)
comm = cfmt % (' ', str)
comm = cfmt % (' ', str_key)
# Write out the string definition
f.write(lstr_fmt % (name, val, comm))

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
# marlang.py
# languageUtil.py
#
# A dictionary to contain language names

View File

@@ -1,197 +0,0 @@
#!/usr/bin/env node
//
// Formatter script for pins_MYPINS.h files
//
// Usage: mffmt [infile] [outfile]
//
// With no parameters convert STDIN to STDOUT
//
const fs = require("fs");
var do_log = false
function logmsg(msg, line='') {
if (do_log) console.log(msg, line);
}
// String lpad / rpad
String.prototype.lpad = function(len, chr) {
if (!len) return this;
if (chr === undefined) chr = ' ';
var s = this+'', need = len - s.length;
if (need > 0) s = new Array(need+1).join(chr) + s;
return s;
};
String.prototype.rpad = function(len, chr) {
if (!len) return this;
if (chr === undefined) chr = ' ';
var s = this+'', need = len - s.length;
if (need > 0) s += new Array(need+1).join(chr);
return s;
};
// Concatenate a string, adding a space if necessary
// to avoid merging two words
String.prototype.concat_with_space = function(str) {
const c = this.substr(-1), d = str.charAt(0);
if (c !== ' ' && c !== '' && d !== ' ' && d !== '')
str = ' ' + str;
return this + str;
};
const mpatt = [ '-?\\d{1,3}', 'P[A-I]\\d+', 'P\\d_\\d+', 'Pin[A-Z]\\d\\b' ],
definePatt = new RegExp(`^\\s*(//)?#define\\s+[A-Z_][A-Z0-9_]+\\s+(${mpatt.join('|')})\\s*(//.*)?$`, 'gm'),
ppad = [ 3, 4, 5, 5 ],
col_comment = 50,
col_value_rj = col_comment - 3;
var mexpr = [];
for (let m of mpatt) mexpr.push(new RegExp('^' + m + '$'));
const argv = process.argv.slice(2), argc = argv.length;
var src_file = 0, dst_file;
if (argc > 0) {
let ind = 0;
if (argv[0] == '-v') { do_log = true; ind++; }
dst_file = src_file = argv[ind++];
if (ind < argc) dst_file = argv[ind];
}
// Read from file or STDIN until it terminates
const filtered = process_text(fs.readFileSync(src_file).toString());
if (dst_file)
fs.writeFileSync(dst_file, filtered);
else
console.log(filtered);
// Find the pin pattern so non-pin defines can be skipped
function get_pin_pattern(txt) {
var r, m = 0, match_count = [ 0, 0, 0, 0 ];
var max_match_count = 0, max_match_index = -1;
definePatt.lastIndex = 0;
while ((r = definePatt.exec(txt)) !== null) {
let ind = -1;
if (mexpr.some((p) => {
ind++;
const didmatch = r[2].match(p);
return r[2].match(p);
}) ) {
const m = ++match_count[ind];
if (m > max_match_count) {
max_match_count = m;
max_match_index = ind;
}
}
}
if (max_match_index === -1) return null;
return { match:mpatt[max_match_index], pad:ppad[max_match_index] };
}
function process_text(txt) {
if (!txt.length) return '(no text)';
const patt = get_pin_pattern(txt);
if (!patt) return txt;
const pindefPatt = new RegExp(`^(\\s*(//)?#define)\\s+([A-Z_][A-Z0-9_]+)\\s+(${patt.match})\\s*(//.*)?$`),
noPinPatt = new RegExp(`^(\\s*(//)?#define)\\s+([A-Z_][A-Z0-9_]+)\\s+(-1)\\s*(//.*)?$`),
skipPatt1 = new RegExp('^(\\s*(//)?#define)\\s+(AT90USB|USBCON|(BOARD|DAC|FLASH|HAS|IS|USE)_.+|.+_(ADDRESS|AVAILABLE|BAUDRATE|CLOCK|CONNECTION|DEFAULT|ERROR|EXTRUDERS|FREQ|ITEM|MKS_BASE_VERSION|MODULE|NAME|ONLY|ORIENTATION|PERIOD|RANGE|RATE|READ_RETRIES|SERIAL|SIZE|SPI|STATE|STEP|TIMER|VERSION))\\s+(.+)\\s*(//.*)?$'),
skipPatt2 = new RegExp('^(\\s*(//)?#define)\\s+([A-Z_][A-Z0-9_]+)\\s+(0x[0-9A-Fa-f]+|\d+|.+[a-z].+)\\s*(//.*)?$'),
skipPatt3 = /^\s*#e(lse|ndif)\b.*$/,
aliasPatt = new RegExp('^(\\s*(//)?#define)\\s+([A-Z_][A-Z0-9_]+)\\s+([A-Z_][A-Z0-9_()]+)\\s*(//.*)?$'),
switchPatt = new RegExp('^(\\s*(//)?#define)\\s+([A-Z_][A-Z0-9_]+)\\s*(//.*)?$'),
undefPatt = new RegExp('^(\\s*(//)?#undef)\\s+([A-Z_][A-Z0-9_]+)\\s*(//.*)?$'),
defPatt = new RegExp('^(\\s*(//)?#define)\\s+([A-Z_][A-Z0-9_]+)\\s+([-_\\w]+)\\s*(//.*)?$'),
condPatt = new RegExp('^(\\s*(//)?#(if|ifn?def|elif)(\\s+\\S+)*)\\s+(//.*)$'),
commPatt = new RegExp('^\\s{20,}(//.*)?$');
const col_value_lj = col_comment - patt.pad - 2;
var r, out = '', check_comment_next = false;
txt.split('\n').forEach((line) => {
if (check_comment_next)
check_comment_next = ((r = commPatt.exec(line)) !== null);
if (check_comment_next)
// Comments in column 45
line = ''.rpad(col_comment) + r[1];
else if (skipPatt1.exec(line) !== null) {
//
// #define SKIP_ME
//
logmsg("skip:", line);
}
else if ((r = pindefPatt.exec(line)) !== null) {
//
// #define MY_PIN [pin]
//
logmsg("pin:", line);
const pinnum = r[4].charAt(0) == 'P' ? r[4] : r[4].lpad(patt.pad);
line = r[1] + ' ' + r[3];
line = line.rpad(col_value_lj).concat_with_space(pinnum);
if (r[5]) line = line.rpad(col_comment).concat_with_space(r[5]);
}
else if ((r = noPinPatt.exec(line)) !== null) {
//
// #define MY_PIN -1
//
logmsg("pin -1:", line);
line = r[1] + ' ' + r[3];
line = line.rpad(col_value_lj).concat_with_space('-1');
if (r[5]) line = line.rpad(col_comment).concat_with_space(r[5]);
}
else if (skipPatt2.exec(line) !== null || skipPatt3.exec(line) !== null) {
//
// #define SKIP_ME
// #else, #endif
//
logmsg("skip:", line);
}
else if ((r = aliasPatt.exec(line)) !== null) {
//
// #define ALIAS OTHER
//
logmsg("alias:", line);
line = r[1] + ' ' + r[3];
line = line.concat_with_space(r[4].lpad(col_value_rj + 1 - line.length));
if (r[5]) line = line.rpad(col_comment).concat_with_space(r[5]);
}
else if ((r = switchPatt.exec(line)) !== null) {
//
// #define SWITCH
//
logmsg("switch:", line);
line = r[1] + ' ' + r[3];
if (r[4]) line = line.rpad(col_comment).concat_with_space(r[4]);
check_comment_next = true;
}
else if ((r = defPatt.exec(line)) !== null) {
//
// #define ...
//
logmsg("def:", line);
line = r[1] + ' ' + r[3] + ' ';
line = line.concat_with_space(r[4].lpad(col_value_rj + 1 - line.length));
if (r[5]) line = line.rpad(col_comment - 1) + ' ' + r[5];
}
else if ((r = undefPatt.exec(line)) !== null) {
//
// #undef ...
//
logmsg("undef:", line);
line = r[1] + ' ' + r[3];
if (r[4]) line = line.rpad(col_comment).concat_with_space(r[4]);
}
else if ((r = condPatt.exec(line)) !== null) {
//
// #if, #ifdef, #ifndef, #elif ...
//
logmsg("cond:", line);
line = r[1].rpad(col_comment).concat_with_space(r[5]);
check_comment_next = true;
}
out += line + '\n';
});
return out.replace(/\n\n+/g, '\n\n').replace(/\n\n$/g, '\n');
}

View File

@@ -27,6 +27,13 @@ def rpad(astr, fill, c=' '):
need = fill - len(astr)
return astr if need <= 0 else astr + (need * c)
# Concatenate a string, adding a space if necessary
# to avoid merging two words
def concat_with_space(s1, s2):
if not s1.endswith(' ') and not s2.startswith(' '):
s1 += ' '
return s1 + s2
# Pin patterns
mpatt = [ r'-?\d{1,3}', r'P[A-I]\d+', r'P\d_\d+', r'Pin[A-Z]\d\b' ]
mstr = '|'.join(mpatt)
@@ -36,7 +43,7 @@ mexpr = [ re.compile(f'^{m}$') for m in mpatt ]
ppad = [ 3, 4, 5, 5 ]
# Match a define line
definePatt = re.compile(rf'^\s*(//)?#define\s+[A-Z_][A-Z0-9_]+\s+({mstr})\s*(//.*)?$')
definePinPatt = re.compile(rf'^\s*(//)?#define\s+[A-Z_][A-Z0-9_]+?_PIN\s+({mstr})\s*(//.*)?$')
def format_pins(argv):
src_file = 'stdin'
@@ -45,6 +52,7 @@ def format_pins(argv):
scnt = 0
for arg in argv:
if arg == '-v':
global do_log
do_log = True
elif scnt == 0:
# Get a source file if specified. Default destination is the same file
@@ -85,7 +93,7 @@ def get_pin_pattern(txt):
# Find the most common matching pattern
match_threshold = 5
for line in txt.split('\n'):
r = definePatt.match(line)
r = definePinPatt.match(line)
if r == None: continue
ind = -1
for p in mexpr:
@@ -135,7 +143,7 @@ def process_text(txt):
logmsg("pin:", line)
pinnum = r[4] if r[4][0] == 'P' else lpad(r[4], patt['pad'])
line = f'{r[1]} {r[3]}'
line = rpad(line, col_value_lj) + pinnum
line = concat_with_space(rpad(line, col_value_lj), pinnum)
if r[5]: line = rpad(line, col_comment) + r[5]
d['line'] = line
return True
@@ -149,7 +157,7 @@ def process_text(txt):
if r == None: return False
logmsg("pin -1:", line)
line = f'{r[1]} {r[3]}'
line = rpad(line, col_value_lj) + '-1'
line = concat_with_space(rpad(line, col_value_lj), '-1')
if r[5]: line = rpad(line, col_comment) + r[5]
d['line'] = line
return True
@@ -179,8 +187,8 @@ def process_text(txt):
if r == None: return False
logmsg("alias:", line)
line = f'{r[1]} {r[3]}'
line += lpad(r[4], col_value_rj + 1 - len(line))
if r[5]: line = rpad(line, col_comment) + r[5]
line = concat_with_space(line, lpad(r[4], col_value_rj + 1 - len(line)))
if r[5]: line = concat_with_space(rpad(line, col_comment), r[5])
d['line'] = line
return True
@@ -193,7 +201,7 @@ def process_text(txt):
if r == None: return False
logmsg("switch:", line)
line = f'{r[1]} {r[3]}'
if r[4]: line = rpad(line, col_comment) + r[4]
if r[4]: line = concat_with_space(rpad(line, col_comment), r[4])
d['line'] = line
d['check_comment_next'] = True
return True
@@ -207,7 +215,7 @@ def process_text(txt):
if r == None: return False
logmsg("def:", line)
line = f'{r[1]} {r[3]} '
line += lpad(r[4], col_value_rj + 1 - len(line))
line = concat_with_space(line, lpad(r[4], col_value_rj + 1 - len(line)))
if r[5]: line = rpad(line, col_comment - 1) + ' ' + r[5]
d['line'] = line
return True
@@ -221,7 +229,7 @@ def process_text(txt):
if r == None: return False
logmsg("undef:", line)
line = f'{r[1]} {r[3]}'
if r[4]: line = rpad(line, col_comment) + r[4]
if r[4]: line = concat_with_space(rpad(line, col_comment), r[4])
d['line'] = line
return True
@@ -233,7 +241,7 @@ def process_text(txt):
r = condPatt.match(line)
if r == None: return False
logmsg("cond:", line)
line = rpad(r[1], col_comment) + r[5]
line = concat_with_space(rpad(r[1], col_comment), r[5])
d['line'] = line
d['check_comment_next'] = True
return True
@@ -263,7 +271,7 @@ def process_text(txt):
elif tryUndef(wDict): pass #undef ...
elif tryCond(wDict): pass #if|ifdef|ifndef|elif ...
out += wDict['line'] + '\n'
out += wDict['line'].rstrip() + '\n'
return re.sub('\n\n$', '\n', re.sub(r'\n\n+', '\n\n', out))

View File

@@ -1,11 +1,6 @@
import argparse
import sys
import os
import time
import random
import serial
Import("env")
import argparse, sys, os, time, random, serial
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
import MarlinBinaryProtocol

View File

@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm

View File

@@ -3055,7 +3055,7 @@ cmt_multi_first_len_minimum = 4 # unsigned number
# Path to a file that contains text to insert at the beginning of a file if
# the file doesn't start with a C/C++ comment. If the inserted text contains
# '$(filename)', that will be replaced with the current file's name.
cmt_insert_file_header = "./buildroot/share/extras/file_header.h" # string
cmt_insert_file_header = "./buildroot/share/uncrustify/file_header.h" # string
# Path to a file that contains text to insert at the end of a file if the
# file doesn't end with a C/C++ comment. If the inserted text contains

View File

@@ -72,7 +72,7 @@
from __future__ import print_function
from __future__ import division
import sys,os,re
import sys, os, re
pwd = os.getcwd() # make sure we're executing from the correct directory level
pwd = pwd.replace('\\', '/')
@@ -103,7 +103,7 @@ current_OS = platform.system()
target_env = ''
board_name = ''
from datetime import datetime, date, time
from datetime import datetime
#########
# Python 2 error messages:
@@ -151,8 +151,6 @@ def get_answer(board_name, question_txt, options, default_value=1):
root_get_answer.protocol("WM_DELETE_WINDOW", disable_event)
root_get_answer.resizable(False, False)
root_get_answer.radio_state = default_value # declare variables used by TK and enable
global get_answer_val
get_answer_val = default_value # return get_answer_val, set default to match radio_state default
@@ -880,7 +878,6 @@ def run_PIO(dummy):
print('build_type: ', build_type)
import subprocess
import sys
print('starting platformio')
@@ -965,7 +962,6 @@ def run_PIO(dummy):
########################################################################
import time
import threading
if python_ver == 2:
import Tkinter as tk
@@ -978,7 +974,6 @@ else:
import tkinter as tk
import queue as queue
from tkinter import ttk, Tk, Frame, Text, Menu
import subprocess
import sys
que = queue.Queue()
#IO_queue = queue.Queue()

View File

@@ -184,7 +184,7 @@
# section avr061.zip which accompanies the application note
# AVR061 available from:
#
# http://www.atmel.com/atmel/acrobat/doc2525.pdf
# https://www.microchip.com/en-us/application-notes/an2525
#
#define ATTINY10 0x10 /* the _old_ one that never existed! */

View File

@@ -184,7 +184,7 @@
# section avr061.zip which accompanies the application note
# AVR061 available from:
#
# http://www.atmel.com/atmel/acrobat/doc2525.pdf
# https://www.microchip.com/en-us/application-notes/an2525
#
#define ATTINY10 0x10 /* the _old_ one that never existed! */

View File

@@ -184,7 +184,7 @@
# section avr061.zip which accompanies the application note
# AVR061 available from:
#
# http://www.atmel.com/atmel/acrobat/doc2525.pdf
# https://www.microchip.com/en-us/application-notes/an2525
#
#define ATTINY10 0x10 /* the _old_ one that never existed! */

View File

@@ -13,7 +13,7 @@
from __future__ import print_function
from __future__ import division
import subprocess,os,platform
import subprocess, os, platform
from SCons.Script import DefaultEnvironment
current_OS = platform.system()

View File

@@ -9,9 +9,9 @@
# Will continue on if a COM port isn't found so that the compilation can be done.
#
import os
import os, platform
from SCons.Script import DefaultEnvironment
import platform
current_OS = platform.system()
env = DefaultEnvironment()