Skip to content

Commit

Permalink
Possible fix for too many lines problem
Browse files Browse the repository at this point in the history
  • Loading branch information
AKuHAK committed Aug 13, 2024
1 parent 4c67506 commit d128f24
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions base/elect.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ static const ElectMechaTaskPrep_t AutoAdj140Commands[] = {
{7, 0, 3000, MECHA_CMD_SLED_POS_HOME, "CD SLED HOME POSITION", NULL},
{8, 0, 15000, MECHA_CMD_DETECT_ADJ, "CD DETECT ADJUSTMENT TO EEPROM WR", "00"},
{0, 0, 500, MECHA_TASK_UI_CMD_WAIT, "WAIT 500ms", NULL},
{0, 0, 3000, MECHA_CMD_WRITE_CHECKSUM, "ALL EEPROM CHECK SUM WR", "00"},
{9, 0, 3000, MECHA_CMD_WRITE_CHECKSUM, "ALL EEPROM CHECK SUM WR", "00"},
{0, 0, 100, MECHA_TASK_UI_CMD_WAIT, "CD WAIT 100ms", NULL},
{10, MECHA_CMD_TAG_ELECT_OP_TYPE_ERROR, 6000, MECHA_CMD_EEPROM_READ, "CD GET CD-MAX (OP TYPE ERR)", "0034"},
{11, 0, 1000, MECHA_CMD_DISC_MODE_CD_8, "CD 8cm DISC MODE", NULL},
Expand Down Expand Up @@ -494,7 +494,7 @@ static const ElectMechaTaskPrep_t AutoAdjSlimCommands[] = {
{7, 0, 3000, MECHA_CMD_SLED_POS_HOME, "CD SLED HOME POSITION", NULL},
{8, 0, 15000, MECHA_CMD_DETECT_ADJ, "CD DETECT ADJUSTMENT TO EEPROM WR", "00"},
{0, 0, 500, MECHA_TASK_UI_CMD_WAIT, "WAIT 500ms", NULL},
{0, 0, 3000, MECHA_CMD_WRITE_CHECKSUM, "ALL EEPROM CHECK SUM WR", "00"},
{9, 0, 3000, MECHA_CMD_WRITE_CHECKSUM, "ALL EEPROM CHECK SUM WR", "00"},
{0, 0, 100, MECHA_TASK_UI_CMD_WAIT, "CD WAIT 100ms", NULL},
{10, MECHA_CMD_TAG_ELECT_OP_TYPE_ERROR, 6000, MECHA_CMD_EEPROM_READ, "CD GET CD-MAX (OP TYPE ERR)", "0034"},
{11, 0, 1000, MECHA_CMD_DISC_MODE_CD_8, "CD 8cm DISC MODE", NULL},
Expand Down
2 changes: 2 additions & 0 deletions base/mecha.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ int MechaCommandExecuteList(MechaCommandTxHandler_t transmit, MechaCommandRxHand

if (result == -EPIPE)
{
TaskCount = 0;
if (!is_valid_data(RxBuffer, size))
{
PlatShowEMessage("Error: Connection problems, received invalid data for task ID %02d.\n", task->id);
Expand All @@ -174,6 +175,7 @@ int MechaCommandExecuteList(MechaCommandTxHandler_t transmit, MechaCommandRxHand

if (receive != NULL)
{
TaskCount = 0;
if ((result = receive(task, RxBuffer, size)) != 0)
break;
}
Expand Down
2 changes: 1 addition & 1 deletion base/mecha.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAX_MECHA_TASKS 128
#define MAX_MECHA_TASKS 256
#define MECHA_TASK_ARGS_MAX 24

// Recommended buffer sizes for various functions
Expand Down

0 comments on commit d128f24

Please sign in to comment.