bigtreetech / BIGTREETECH-TouchScreenFirmware

support TFT35 V1.0/V1.1/V1.2/V2.0/V3.0, TFT28, TFT24 V1.1, TFT43, TFT50, TFT70
GNU General Public License v3.0
1.32k stars 1.65k forks source link

[BUG] Error in parseACK.c when using a Delta Printer #2858

Closed lightmaster closed 1 year ago

lightmaster commented 1 year ago

Description

I haven't used my printer in about 8 months now. Trying to build this now and I'm getting the following error for a TFT43_V3. Seems its a issue with the if blocks in parseACK.c, specifically for when DELTA_PROBE_TYPE != 0. Not too familiar with the coding, but that's the spot where the first error is poping up at.

TFT/src/User/API/parseACK.c: In function 'parseACK':
TFT/src/User/API/parseACK.c:939:9: error: expected '}' before 'else'
         else
         ^~~~
TFT/src/User/API/parseACK.c:369:10: warning: variable 'avoid_terminal' set but not used [-Wunused-but-set-variable]
     bool avoid_terminal = false;
          ^~~~~~~~~~~~~~
TFT/src/User/API/parseACK.c:949:5: error: 'else' without a previous 'if'
     else if (ack_starts_with("M200"))
     ^~~~
Compiling .pio/build/BIGTREE_TFT43_V3_0/src/src/User/Fatfs/ffsystem.o
TFT/src/User/API/parseACK.c:1398:10: error: 'avoid_terminal' undeclared (first use in this function); did you mean 'menuTerminal'?
     if (!avoid_terminal && MENU_IS(menuTerminal))
          ^~~~~~~~~~~~~~
          menuTerminal
TFT/src/User/API/parseACK.c:1398:10: note: each undeclared identifier is reported only once for each function it appears in
TFT/src/User/API/parseACK.c: At top level:
TFT/src/User/API/parseACK.c:1422:1: error: expected identifier or '(' before '}' token
 }
 ^
*** [.pio/build/BIGTREE_TFT43_V3_0/src/src/User/API/parseACK.o] Error 1

Steps to reproduce

  1. Try to build when using a Delta printer
  2. Fails to build with the error messages above

Expected behavior

Actual behavior

Hardware Variant

TFT43_V3

TFT Firmware Version & Main Board Firmware details

Additional Information

https://pastebin.com/uYdfFTWi

digant73 commented 1 year ago

to temporary fix the issue in parseAck.c simply replace lines starting from line 903 with the following:

        {
          popupDialog(DIALOG_TYPE_SUCCESS, LABEL_DELTA_CONFIGURATION, LABEL_EEPROM_SAVE_INFO,
                      LABEL_CONFIRM, LABEL_CANCEL, saveEepromSettings, NULL, NULL);
        }
        else
        {
          popupReminder(DIALOG_TYPE_SUCCESS, LABEL_DELTA_CONFIGURATION, LABEL_PROCESS_COMPLETED);
        }

The bug will be fixed in #2840

lightmaster commented 1 year ago

It builds fine now. Thanks.

github-actions[bot] commented 8 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.