Skip to content

Custom menu selection text doesn't update after changing boards when menu ID is different but menu text is the same as a previously selected board #5260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
per1234 opened this issue Aug 17, 2016 · 9 comments · Fixed by #8880
Labels

Comments

@per1234
Copy link
Collaborator

per1234 commented Aug 17, 2016

Using Arduino IDE 1.6.11 Hourly Build 2016/08/16 11:33 with Windows 7 64 bit

  1. File > Preferences > Additional Boards Manager URLs: > https://zevero.github.io/avr_boot/package_zevero_avr_boot_index.json
  2. Tools > Board > Boards Manager > avr_boot > 1.2.0 > Install > Close
  3. Tools > Board > Arduino/Genuino Mega or Mega 2560
  4. Tools > Board > ATmega328/P

Now look at the selection text shown in quotes next to the Tools > Board > Processor menu item: Processor: ATmega2560 (Mega 2560). I you select the Tools > Board > Processor menu you can see that it doesn't have an ATmega2560 (Mega 2560) option. That text has been left over from the previous board selection. Even after changing the Processor menu selection the menu item text doesn't change.
clipboard02

This only occurs when the menu ID value in boards.txt is different from the Arduino AVR Boards(or any other core) value but the menu text value in boards.txt is the same as the other core's value. In this case:

menu.processor=Processor

If this is changed to menu.cpu=Processor(the same as Arduino AVR Boards) then the issue doesn't occur.

If it's changed to menu.processor=CPU then the issue doesn't occur.

If it's changed to menu.avr_boot_processor=Processor the issue does occur.

EDIT 2017-07-06: I checked with Arduino IDE 1.8.3 and the issue still occurs after following the steps above..

@cmaglie
Copy link
Member

cmaglie commented Aug 17, 2016

If it's changed to menu.avr_boot_processor=Processor the issue does occur.

this remembers me about an old issue involving underscores in the submenu definitions.
Just a blind guess: may you try to remove all underscores from the submenu name?

menu.avr_boot_processor=Processor -> menu.avrbootprocessor=Processor

@per1234
Copy link
Collaborator Author

per1234 commented Aug 17, 2016

menu.avr_boot_processor=Processor -> menu.avrbootprocessor=Processor

I tried it with the avrbootprocessor MENU_ID and it still causes the issue.

@cmaglie
Copy link
Member

cmaglie commented Aug 17, 2016

Ok, following your instructions I can reproduce the issue.
It seems that the menu item is not updated correctly BTW, besides the GUI issue, it seems that the selection is working correctly, can you confirm that?

Fixing this bug requires touching the submenu selection logic in the IDE (that is quite complex really) and it will not happen for 1.6.11, I'm setting the milestone for this bug to 1.6.12.

@per1234
Copy link
Collaborator Author

per1234 commented Aug 17, 2016

it seems that the selection is working correctly, can you confirm that?

Yes, it works correctly.

Thanks for looking into this. I agree it's not a high priority bug. To fix this specific case I only need to change the MENU_ID to cpu when I do the next avr_boot release but I've confirmed this also happens when the same conditions occur with any other installed boards packages so it's possible for another combination to cause the issue.

@hasenradball
Copy link

Hi is there already an solution available?

@per1234
Copy link
Collaborator Author

per1234 commented May 4, 2019

There is no solution yet to the bug in the Arduino IDE. However, the workaround for the issue is to change the menu label text in one of the boards.txt files. The issue only occurs when multiple boards.txt files use the same menu label text.

In the particular case of having both the ESP8266 and ESP32 cores installed, that could be done by changing line 1 of the ESP32 boards.txt from:

menu.UploadSpeed=Upload Speed

to:

menu.UploadSpeed=Upload Baud Rate

(or whatever text you prefer, as long as it's not "Upload Speed"). Of course you could change the ESP8266 boards.txt instead if you prefer.

Note that you'll need to redo this every time you update to a new version of the ESP32 core.

@hasenradball
Copy link

Hi,
thanks for the fast reply, this could be an option for me.
Is it correct that I have only to change the line 1, which is the name of the menue?

@per1234
Copy link
Collaborator Author

per1234 commented May 4, 2019

Is it correct that I have only to change the line 1

That's correct. That line defines the menu label text for all the ESP32 boards that have an UploadSpeed menu.

@hasenradball
Copy link

Ok Fine works perfect! :-)

I change it Upload Speed (ESP32) -> for the ESP32
and Upload Speed (ESP8266) -> ESP8266

Thanks!

ESP32

facchinm added a commit to facchinm/Arduino that referenced this issue May 14, 2019
facchinm added a commit to facchinm/Arduino that referenced this issue May 15, 2019
platform.getId() gives the same result for derived cores.
Issue arduino#5260 is caused by both cores declaring as `avr`, with the same label but different identifier.
This patch completes the previous one by adding the folder where the core resides to the matching id.
facchinm added a commit that referenced this issue Jul 18, 2019
facchinm added a commit that referenced this issue Jul 18, 2019
platform.getId() gives the same result for derived cores.
Issue #5260 is caused by both cores declaring as `avr`, with the same label but different identifier.
This patch completes the previous one by adding the folder where the core resides to the matching id.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants