GUI
- FDR
- Offline
Other question: Is there any reason why most of the channels default to -100%, but the throttle defaults to +100%? Of course I see that it is only in the emulator, since in the transmitter it gets the actual readings from the sticks...
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Do the reverse switches change only the bits in the 9th byte of the 0x8b and 0x8c packets, or do they inverse their stick values?
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
If you are wondering how the 'reverse' button is applied, it is applied at the very end before transmitting to the transmitter. When I'm done it won't be needed for the throttle, since we want to invert the throttle value in the firmware (i.e. hide the fact that it is inverted in hardware from the user). I just didn't want to forget, so I made the simulator match the devo8 raw input.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
There is a new page (3rd to the right) for editing model data.
It includes the new keyboard entry (for changing the model name) and the load/save dialog for switching models.
You cannot create new models with the code, but it will show whichever models you have (must be named 'model#.ini' where # is between 1 and 100. It reads the model name from the file and model names can be up to 24 characters
It isn't particularly pretty, but it should get the job done.
Note that the load/save don't actually work yet, but that will be in the next commit.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
A few comments:
1. While the name could be 24 chars length, the input only allows 20
2. I missed the cursor, but then I realized, that it is always at the end, and the DEL is rather a backspace
3. The CAPS is a bit confusing too, because it really is a shift, not a caps lock. It would be nice, if the letters on the buttons would reflect the caps state!
4. When called from a numeric only field, the numeric keyboard shouldn't allow to input letters and symbols other than sign and decimal, when they are allowed, and it doesn't handle min/max limits either.
Don't get me wrong, I really like it, it's just can be refined further...
Please Log in or Create an account to join the conversation.
- FDR
- Offline
The scroll on the listbox works strange.
It works backwards, and can loose selection...
Other than that, there are some cosmetics, like Watt should be uppercase (10mW), and IMO the protocol names too...
By the way, what is the purpose of the "none" protocol?
May be it disables the transmission and only outputs PPM on the trainer port?
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
I'll play with the listbox some-more. Scrolling was wokring when I tested it initially. I haven't played with it much now that it is actually connected to the model list though.
The 'None' protocol is mostly for my testing so I don't have interrupts firing when I'm trying to do debug. I dunno if it'll ever be useful for anything else, but it does no harm being there.
I considered making the keyboard case sensitive. It is pretty easy to do.
Fixing the number pad to work properly is more work. I'll get there eventually.
I'm not yet sure what the appropriate name length is. Probably whatever will fit in the relevant dialogs. But I should make it consistent.
Thanks for the thorough testing!
Please Log in or Create an account to join the conversation.
- FDR
- Offline
The length of the model name is not critical, but the 8 characters of the original fw is ridicuolus, because they themselves have longer type names...
Other complaint about the listbox is the color scheme it uses.
Black text is hard to see on the dark grey selection background.
Visibility was the main reason we started to hack the DEVO libraries!
Will the color scheme be configurable?
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
In any case, my thought is to use another ini file to store all color settings (foreground, and background) as well as font and font-size for each gui object type so that it is fully customizable. I still need to figure out how to do that while still allowing potentially multiple colors to be used for a given widget depending on context, but I don't expect it to be too hard to do.
For the moment at least I've decided against a fully dynamic gui definition where the placement and size of GUI objects is also configurable.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Background images can be smaller if they are one pixel wide and are scaled up when used (like most web design do), but that would limit the possible look.
On configurable I mean all the fore and background colors should be definable, as well as the fixed size bitmaps it uses for the controls for example.
An example is, that someone should be able to define an inverse scheme if he liked, or a high contrast or black and white one.
I have some ideas for customizable main screens, but even that wouldn't be fully dynamic (because it effectively means coding), but using predefined compositions with definable contents...
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Can you explain? I tried it with 100 models, and it worked as I expect. selection is maintained as you scroll off the screen and then back. There is no position marker so you can't tell how many elements there are, nor can you page through them particularly quickly (I'll fix those eventually)FDR wrote: ...continued:
The scroll on the listbox works strange.
It works backwards, and can loose selection...
Please Log in or Create an account to join the conversation.
- FDR
- Offline
So the unusual thing was, that the arrows don't change the selection, but only scroll the list.
If I have a 3 element list it will look like this, if the second is selected:
1:Model1
2:Model1
3:Model1
Now if I click on the up arrow, nothing happens. It doesn't change selection to the first row.
But if I click on the down arrow, it starts to scroll out the list and introduce "NONE"-s instead of elements.
After 1 click:
2:Model1
3:Model1
NONE
Second click:
3:Model1
NONE
NONE
Is that the way it supposed to work?
IMO it should change selection in both direction, and if the selection reached the upper or lower bound of the list while there are more rows, then scroll the list by one.
Other interesting thing, that it scrolls out rows even when they can be shown all at once, and makes those NONE rows instead...
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
If you created additional model#.ini files, they'll show up as 'NONE' if they don't contain a 'name=' field. You can't load a model from these (well you probably can, but shouldn't), but you can save to them.
EDIT: This will be more obvious when I finish the scrollbar implementation. there is no 'bar' in the scrollbar today, so it isn't obvious what the arrows are doing.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
I also introduced images/config.ini that you can use to change some of the colors. namely the keyboard, listbox, and throttle-display are fully configurable, as are the default font and text color. It'll take some time to figure out where unique fonts/colors are needed, but this should give you an idea of the type of configuration I'm thinking of.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- FDR
- Offline
No. All three has the name field. The nones simply appear in place of the scrolled out items.PhracturedBlue wrote: If you created additional model#.ini files, they'll show up as 'NONE' if they don't contain a 'name=' field. You can't load a model from these (well you probably can, but shouldn't), but you can save to them.
EDIT: I will try the new one soon...
Please Log in or Create an account to join the conversation.
- FDR
- Offline
One more thing about the keyboard: could you implement the long click for the DEL button to speed up deleting a long text?
It doesn't needed for the others I think...
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Please Log in or Create an account to join the conversation.