Pin fix, rx stuck state flush

This commit is contained in:
InsanityAutomation
2023-08-05 18:03:21 -04:00
parent d3704f834a
commit 59dffb5f1c
4 changed files with 24 additions and 15 deletions
+3 -3
View File
@@ -1197,8 +1197,8 @@
* Endstop "Hit" State
* Set to the state (HIGH or LOW) that applies to each endstop.
*/
#define X_MIN_ENDSTOP_HIT_STATE HIGH
#define X_MAX_ENDSTOP_HIT_STATE HIGH
#define X_MIN_ENDSTOP_HIT_STATE LOW
#define X_MAX_ENDSTOP_HIT_STATE LOW
#if ENABLED(OpticalY)
#define Y_MIN_ENDSTOP_HIT_STATE LOW
#else
@@ -1210,7 +1210,7 @@
#else
#define Z_MIN_ENDSTOP_HIT_STATE LOW
#endif
#define Z_MAX_ENDSTOP_HIT_STATE HIGH
#define Z_MAX_ENDSTOP_HIT_STATE LOW
#define I_MIN_ENDSTOP_HIT_STATE HIGH
#define I_MAX_ENDSTOP_HIT_STATE HIGH
#define J_MIN_ENDSTOP_HIT_STATE HIGH
+4 -4
View File
@@ -696,8 +696,8 @@
#define E0_AUTO_FAN_PIN PA8
#define E1_AUTO_FAN_PIN PE5
#else
#define E0_AUTO_FAN_PIN FAN2_PIN
#define E1_AUTO_FAN_PIN FAN2_PIN
#define E0_AUTO_FAN_PIN FAN1_PIN
#define E1_AUTO_FAN_PIN FAN1_PIN
#endif
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
@@ -2031,8 +2031,8 @@
//
// Additional options for DGUS / DWIN displays
//
#define DGUS_RX_BUFFER_SIZE 128
#define DGUS_TX_BUFFER_SIZE 48
#define DGUS_RX_BUFFER_SIZE 256
#define DGUS_TX_BUFFER_SIZE 32
#if HAS_DGUS_LCD
#define LCD_SERIAL_PORT 3
#define LCD_BAUDRATE 115200
+16 -7
View File
@@ -47,6 +47,8 @@ namespace ExtUI
const float manual_feedrate_mm_m[] = MANUAL_FEEDRATE;
uint8_t startprogress = 0;
uint16_t rcvdData;
uint8_t babystepIncrementIndex = 0;
char waitway = 0;
@@ -160,7 +162,7 @@ void onIdle()
{
int dataRec;
do { dataRec = rtscheck.RTS_RecData(); } while (dataRec > 0);
do { dataRec = rtscheck.RTS_RecData(); rcvdData++;} while (dataRec > 0);
if (reEntryPrevent && reEntryCount < 120) {
reEntryCount++;
@@ -567,14 +569,21 @@ if(idleThrottling == 1900) {
void yield();
if(idleThrottling == 2000) {
idleThrottling = 0;
}
#if ENABLED(DWINOS_4)
int dataRec2;
do { dataRec2 = rtscheck.RTS_RecData(); } while (dataRec2 > 0); // Since OS4 returns an ack on an 82 command, receive and purge it now
do { dataRec2 = rtscheck.RTS_RecData(); rcvdData++;} while (dataRec2 > 0); // Since OS4 returns an ack on an 82 command, receive and purge it now
#endif
if(idleThrottling == 2000) {
if(rcvdData < 4010)
{
SERIAL_ECHOLNPGM("RX Halt Detected...");
RTSSHOW::rx_datagram_state = DGUS_IDLE;
DWIN_SERIAL.flush();
}
idleThrottling = 0;
}
reEntryPrevent = false;
}
@@ -2904,7 +2913,7 @@ void onSetPowerLoss(const bool onoff)
}
void onPowerLoss()
{
}
@@ -7,7 +7,7 @@ import pioutil
if pioutil.is_pio_build():
Import("env")
env.Replace(PROGNAME="%s_DW9" % (str(env["PIOENV"])))
env.Replace(PROGNAME="%s_DW7.4.9" % (str(env["PIOENV"])))
cxxflags = [
# "-Wno-incompatible-pointer-types",