PokemonAutomation / Arduino-Source

MIT License
21 stars 57 forks source link

Confirm sandwich ingredient added, to avoid button drops. #460

Closed jw098 closed 2 months ago

jw098 commented 2 months ago

Use icon detection to confirm that the selected ingredients are actually added to ensure we didn't drop any buttons.

Since we can confirm that ingredients are added, we can also loop A button presses when multiple of a given ingredient is required. Because if you run out of an ingredient, it will detect that nothing has been added and throw an exception.

Also, since the ingredient reader now needs to also read the confirmation icons, I refactored the reader to contain all the boxes for all rows/columns, not just for one row.