MobiFlight-Connector
MobiFlight-Connector copied to clipboard
Easy Pin Swap using an Overwrite
Is your feature request related to a problem? Please describe. Whenever I want to swap a configuration's pins I have to:
- Change both pins to an open pin
- Flash the Arduino
- Change both pins to the desired pin
- Flash Arduino
- Check Result (Sometimes the software disregards the swap/I did it wrong, so I have to repeat it)
Describe the solution you'd like I'd like to be able to insert a pin manually (not shown from the dropdown), then MobiFlight say "This pin is already in use, would you like to overwrite it?" You'd press yes to erase the old pin, or no to cancel.
Describe alternatives you've considered I've considered also deleting the device and re-configuring it but this causes down the line problems.
Additional context None. Have a fantabulous day!!
An idea on a possible solution: allow the entry of pins with (some) "illegal" parameters, leaving them marked as incorrect, but do not account for them when generating the configuration.
They can be modified again later with the correct parameters without deleting/reinserting them.
(Even a "swap pins" button would do for the specific issue, but this solution would allow for more elaborate changes.)
Two things:
- You dont need to flash. While this is not a lot better, you can select "wrong" pins, select another pin config, and select the one you are editing again, now it has "freed" the pins and you can swap them.
- Just open the .mfmc in a text editor and swap them, and open & flash the config again.
Overwriting pins would mean the overwritten pin would need to be assigned to a new number on the affected configuration item. It would need to either show some flag as "this is not complete", or just swap to another free pin randomly (or ask for a pin to change to) but it might just make things very complicated.
i think a swap pins button is helpful for encoders, if you find your encoder is turning wrong direction.
For devices like 7 segment displays it would not make sense to swap pins because you would have to swap through all permutations.
I have to think about it
Chatting about it in discord. I understand that a work around is to change the pins to a free pin and then select another "device". Whatever this process is, "saves" the config to the free pins. You can then go back to the "device" you are changing and select the pins with the originals being available again.
My non programmer thought is that whatever you are doing programmatically to "save" the pin config when you move between devices, could be instead applied to an "apply button". This would then allow you to simply click apply which would save the current pins, refresh the pull down menu, freeing the original pins. This would then fix the problem for all device types, not just encoders.
Hope the makes sense.
Andrew (SirLemonaids)
Please also consider that if your configuration uses all pins in the arduino, one cannot simply assign a free pin. You would have to delete a device in order to free those pins just to be able to swap. I kind of like the solution that allows you to assign pins manually (already used) but flags which configurations have duplicate pin assignment when trying to save and exit.