Parcourir la source

Followup to "no status for serial::write" (#21577)

ellensp il y a 3 ans
Parent
révision
62f992af23
Aucun compte lié à l'adresse e-mail de l'auteur
3 fichiers modifiés avec 7 ajouts et 9 suppressions
  1. 3
    5
      Marlin/src/core/serial_hook.h
  2. 1
    1
      Marlin/src/feature/meatpack.h
  3. 3
    3
      buildroot/tests/mega2560

+ 3
- 5
Marlin/src/core/serial_hook.h Voir le fichier

@@ -209,11 +209,9 @@ struct MultiSerial : public SerialBase< MultiSerial<Serial0T, Serial1T, offset,
209 209
   static constexpr uint8_t SecondOutput  = (Usage << (offset + step));
210 210
   static constexpr uint8_t Both          = FirstOutput | SecondOutput;
211 211
 
212
-  NO_INLINE size_t write(uint8_t c) {
213
-    size_t ret = 0;
214
-    if (portMask.enabled(FirstOutput))   ret = serial0.write(c);
215
-    if (portMask.enabled(SecondOutput))  ret = serial1.write(c) | ret;
216
-    return ret;
212
+  NO_INLINE void write(uint8_t c) {
213
+    if (portMask.enabled(FirstOutput))   serial0.write(c);
214
+    if (portMask.enabled(SecondOutput))  serial1.write(c);
217 215
   }
218 216
   NO_INLINE void msgDone() {
219 217
     if (portMask.enabled(FirstOutput))   serial0.msgDone();

+ 1
- 1
Marlin/src/feature/meatpack.h Voir le fichier

@@ -133,7 +133,7 @@ struct MeatpackSerial : public SerialBase <MeatpackSerial < SerialT >> {
133 133
   uint8_t charCount;
134 134
   uint8_t readIndex;
135 135
 
136
-  NO_INLINE size_t write(uint8_t c)   { return out.write(c); }
136
+  NO_INLINE void write(uint8_t c)     { out.write(c); }
137 137
   void flush()                        { out.flush();  }
138 138
   void begin(long br)                 { out.begin(br); readIndex = 0; }
139 139
   void end()                          { out.end(); }

+ 3
- 3
buildroot/tests/mega2560 Voir le fichier

@@ -171,11 +171,11 @@ exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Greek" "$3"
171 171
 # Test Laser features with 12864 LCD
172 172
 #
173 173
 restore_configs
174
-opt_set MOTHERBOARD BOARD_RAMPS_14_EFB LCD_LANGUAGE en TEMP_SENSOR_COOLER 1 EXTRUDERS 0 TEMP_SENSOR_1 0
174
+opt_set MOTHERBOARD BOARD_RAMPS_14_EFB LCD_LANGUAGE en TEMP_SENSOR_COOLER 1 EXTRUDERS 0 TEMP_SENSOR_1 0 SERIAL_PORT_2 2
175 175
 opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS EEPROM_BOOT_SILENT EEPROM_AUTO_INIT \
176
-           LASER_FEATURE LASER_COOLANT_FLOW_METER
176
+           LASER_FEATURE LASER_COOLANT_FLOW_METER MEATPACK_ON_SERIAL_PORT_1
177 177
 
178
-exec_test $1 $2 "REPRAP MEGA2560 RAMPS | Laser Feature | Cooler | Flowmeter | 12864 LCD " "$3"
178
+exec_test $1 $2 "REPRAP MEGA2560 RAMPS | Laser Feature | Cooler | Flowmeter | 12864 LCD | meatpack | SERIAL_PORT_2 " "$3"
179 179
 
180 180
 #
181 181
 # Test Laser features with 44780 LCD

Chargement…
Annuler
Enregistrer