Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   RoboDS First Test (http://www.chiefdelphi.com/forums/showthread.php?t=136894)

Ben Wolsieffer 21-05-2015 08:44

Re: RoboDS First Test
 
I installed the app on my Galaxy S4 running 5.1.1, and tried to control our robot, but I ran into a few problems.

Here is a list of the problems I could find, in rough order of severity:
  • IP address setting does not save when changed. I'm not sure if the IP address is actually being changed, but when you open the settings dialog, it is still set to the default and I was unable to connect to our robot.
  • The same thing happens with the portrait/landscape setting, therefore I cannot create a portrait layout.
  • Joysticks seem to be in editing mode when the app is started with an existing layout. They turn green when touched instead of allowing control. Workaround: enter and leave editing mode.
  • When editing fields in the joystick and button creation dialogs, the first digit of each number field is not shown in the editing popup, and the none of the characters of the text fields show up. Interestingly, backspace will delete the these characters even if they are not shown.
  • The bottom of the joystick creation dialog is cut off in the landscape orientation. Could be fixed by making the dialog scrollable.
  • Pressing and holding on a joystick while driving causes the phone to vibrate.
  • The bottom two editing drawers are cut off somewhat in landscape.
  • It might be a good idea to allow only one drawer on the editing screen to be open at a time.
  • Loading and saving multiple layout doesn't seem to work; there is no way to create a new layout. I'm not sure if this just hasn't been implemented yet.
  • The joystick creation dialog should probably be initialized with sensible defaults.
  • "Comming" is misspelled in the bottom two drawers of the editor.
  • "Partrait" is misspelled in the layout settings.

I can upload some screenshots if you want. I hope this is helpful.

raystubbs 21-05-2015 11:33

Re: RoboDS First Test
 
Wow, that sounds pretty bad. I have already listed some of these bugs, like portrait mode not working and only one layout. But I haven't heard o fthe others yet. Some screenshots would be extremely helpful and you android device also. Sorry for the UI mistakes, I'm guessing you are using a phone, I only have s 7" tablet to test on.

raystubbs 21-05-2015 11:45

Re: RoboDS First Test
 
Quote:

Originally Posted by lopsided98 (Post 1483388)
  • IP address setting does not save when changed. I'm not sure if the IP address is actually being changed, but when you open the settings dialog, it is still set to the default and I was unable to connect to our robot.

This is something I can work on. I never tested if the IP saved or not because the default IP is my robot's IP. I just tested the app on my device and found that it does not save, so I'll have that fixed in a few minuts, but my not have the time or internet access to upload it for a while, 'cause I'm going home to Mexico for a week.

raystubbs 21-05-2015 11:47

Re: RoboDS First Test
 
Quote:

Originally Posted by lopsided98 (Post 1483388)
  • Joysticks seem to be in editing mode when the app is started with an existing layout. They turn green when touched instead of allowing control. Workaround: enter and leave editing mode.

Does this happen every time you start the app? If not can it be reproduced? I used an android feature to switch back from edit mode, but this feature is only available in higher APIs, is your android device version 4.1 or higher?

Ben Wolsieffer 22-05-2015 10:35

Re: RoboDS First Test
 
4 Attachment(s)
Sorry if I sounded overly negative in my last response. I'm just trying to suggest ways to improve the app.

My phone is a Samsung Galaxy S4 running Android 5.1.1, the absolute latest version, so it definitely has every API you use.

The editing bug occurs every time the app is cold started (ie. it has been deleted from the recent apps list), but not when the app is minimized/backgrounded and then opened again. When the app is minimized and then opened again, the joysticks start working as intended.

I attached screenshots of some of the bugs:
  • drawer_cut_off.png: Shows the bottom editor drawer being cut off by the bottom of the screen.
  • editing_bug.png: Shows how the joystick can be selected and turn green when not in editing mode.
  • field_editor.png: On phones (I'm not sure if this happens on tablets), an editor pops up when a field in the joystick/button creation dialogs is selected. The field actually contains "-1", but the editor does not show the "-", so it appears as "1"
  • joystick_dialog_cut_off.png: Shows how the last few fields in the joystick editing dialog are cut off by the bottom of the screen. It is still possible to edit them though, by pressing next in the editor.

If you release the code, I'll take a look and it and see if I can help with some of the bugs.

raystubbs 22-05-2015 10:49

Re: RoboDS First Test
 
Quote:

Originally Posted by lopsided98 (Post 1483627)
Sorry if I sounded overly negative in my last response. I'm just trying to suggest ways to improve the app.

My phone is a Samsung Galaxy S4 running Android 5.1.1, the absolute latest version, so it definitely has every API you use.

The editing bug occurs every time the app is cold started (ie. it has been deleted from the recent apps list), but not when the app is minimized/backgrounded and then opened again. When the app is minimized and then opened again, the joysticks start working as intended.

I attached screenshots of some of the bugs:
  • drawer_cut_off.png: Shows the bottom editor drawer being cut off by the bottom of the screen.
  • editing_bug.png: Shows how the joystick can be selected and turn green when not in editing mode.
  • field_editor.png: On phones (I'm not sure if this happens on tablets), an editor pops up when a field in the joystick/button creation dialogs is selected. The field actually contains "-1", but the editor does not show the "-", so it appears as "1"
  • joystick_dialog_cut_off.png: Shows how the last few fields in the joystick editing dialog are cut off by the bottom of the screen. It is still possible to edit them though, by pressing next in the editor.

If you release the code, I'll take a look and it and see if I can help with some of the bugs.

Thanks a lot. You didn't sound overly negative, I was expecting to have some problems with smaller screens. Your feedback really helps. I've now fixed the IP and orientation settings. The problem is that I cannot reproduce your editing bug on my device, so that may take a bit longer to fix. I would love to share the code and get some help, but unfortunately it is extremely ugly. I was in a hurry when writing it so I got really messy. I don't think you want to go mucking through it. Thanks again for the info, it will really help.

Ben Wolsieffer 27-05-2015 10:29

Re: RoboDS First Test
 
Quote:

Originally Posted by raystubbs (Post 1483630)
I would love to share the code and get some help, but unfortunately it is extremely ugly. I was in a hurry when writing it so I got really messy. I don't think you want to go mucking through it. Thanks again for the info, it will really help.

Even if the code is ugly, I would really appreciate it if you released it. Especially if you are not going to have much time to work on the app, I would like to get it working, and it would help a lot to be able to work on it myself.

raystubbs 29-05-2015 21:45

Re: RoboDS First Test
 
Quote:

Originally Posted by lopsided98 (Post 1484354)
Even if the code is ugly, I would really appreciate it if you released it. Especially if you are not going to have much time to work on the app, I would like to get it working, and it would help a lot to be able to work on it myself.

Sorry for the lack of response, I've been in Mexico. I'll put the code on github as soon as possible. Just a warning, the code is quite a mess, but if you would pick up the project and finish it I would appreciate it. I have tried to clean up the most important classes so if nothing else the rest could be completely rewritten.

raystubbs 01-06-2015 21:25

Re: RoboDS First Test
 
The repo is here https://github.com/raystubbs/RobotDS, I've made some changes after my last test so the app may not work at all, please test the binary before playing with the code to make sure I didn't break anything . The binary is located here https://github.com/raystubbs/RobotDS...pp-release.apk.

Ben Wolsieffer 01-06-2015 21:56

Re: RoboDS First Test
 
Thanks!

Ben Wolsieffer 02-06-2015 22:23

Re: RoboDS First Test
 
I forked the project and starting working on fixing some of the bugs. The first major change was to create a .gitignore file and remove all the autogenerated code from the repository. I also upgraded all the plugins, tools and targetSdkVersion to the latest versions.

As far as the code itself, you made it sound like it was much more messy than it is. :)

So far I have fixed:
  • Negative signs not shown in joystick editor
  • Make joystick creation dialog scrollable
  • Sensible defaults (I think*) for joystick creation
  • Joystick vibration on long press (sort of)
  • Misspellings

*Are the joystick/axis indices are 0 or 1 based?

Also, I should mention that the bug fixes have not been pushed to the repository yet, as I am still working on them.

raystubbs 02-06-2015 22:44

Re: RoboDS First Test
 
Quote:

Originally Posted by lopsided98 (Post 1485529)
I forked the project and starting working on fixing some of the bugs. The first major change was to create a .gitignore file and remove all the autogenerated code from the repository. I also upgraded all the plugins, tools and targetSdkVersion to the latest versions.

As far as the code itself, you made it sound like it was much more messy than it is. :)

So far I have fixed:
  • Negative signs not shown in joystick editor
  • Make joystick creation dialog scrollable
  • Sensible defaults (I think*) for joystick creation
  • Joystick vibration on long press (sort of)
  • Misspellings

*Are the joystick/axis indices are 0 or 1 based?

Also, I should mention that the bug fixes have not been pushed to the repository yet, as I am still working on them.

Buttons and axis' are 0+. Thanks for the work you have done, sounds great. One other thing you could do if you'd like is change the joysticks and buttons to extend AxisControl and ButtonControl, where AxisControl has .getAxisCount() and .getAxisArray() and ButtonControl has .getButtonCount() and .getButtonArray(). If the PacketFactory class' register method's were then changed to registerAxisControl() and registerButtonControl() it would be much easier to create new controls such as slider, throttles, etc. since they would just have to extend AxisControl or ButtonControl.

I was planning on changing this, but don't want to mess with it since I can't test it and might just break everything. I know you have other things to work on, I just thought I should share my plan.

Ben Wolsieffer 14-06-2015 12:59

Re: RoboDS First Test
 
1 Attachment(s)
I just pushed all the work I have done so far to the GitHub repo. Most of the changes have been internal, so the app doesn't have many new features yet.

The biggest visible change is that I removed the drawers for creating controls and replaced them with a floating action button menu. The two main reasons I did this is because I was having trouble getting the drawers to work with RelativeLayout and I wanted something that fit better with Android. I realize that it won't work when there are more types of controls, but I am working on an another design for when that happens.

Here is a list of the bigger changes I made to the internals of the app:
  • Use RelativeLayout instead of AbsoluteLayout, because it is deprecated
  • Add support for saving multiple layout files and renaming layouts
  • Move all I/O code off the UI thread, just because it is correct, not because it improves performance
  • Create a new property system based on HashMap for saving layouts
  • Convert some strings to resources

I have not touched the communication code at all, but I will try to test it this week and fix any problems I come across.

I attached the latest build of the app (not signed or anything), in case you want to test it. I tried to test the UI as much as I could, but I probably missed some bugs.

From now on, I will try to make smaller commits and list my changes there, rather than on CD.

raystubbs 14-06-2015 13:39

Re: RoboDS First Test
 
Wow, you really know what you are doing, I have a lot to learn.

raystubbs 14-06-2015 16:07

Re: RoboDS First Test
 
[quote=lopsided98;1486748]
  • Add support for saving multiple layout files and renaming layouts

[\QUOTE]

I tested out the UI, it is much more attractive than that I originally had. But I don't see any options for adding multiple layout files.


All times are GMT -5. The time now is 16:24.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi