Reorganizing everything in the arduino sketch to work with so that if it does need anything from the data dictionary it can be passed from the main.
The loadBuffer parameter is now just the char* instead of the name of a dataelement.
The checkCommand method now accepts the command struct as a parameter instead of a dataelement.
Added checks in the CommandHandler class to check that a command is unique before execution.
This really does seem like a better idea. It keeps it more modular and the arduino side is simple enough that the datadictionary was adding unnecessary complexity. It is still used in the main sketch to handle remote data which passes between the pc and the aruduino which is the main reason it exists in the first place.
Backups indicate nothing is happening. Ah well. We’ll deploy the new code next week and see if we can’t get things moving. I’ll contact Tangie tomorrow.
Working on RPC with GWT. Looks pretty straightforward. I want to understand the limitations on sharing a class between the client and the server.
Added name and password saving to the application. THe easy answer, storing encrypted data didn’t work. saving view state messed up the views. Using FlexGlobals.topLevelApplication.persistenceManager.setProperty() worked, but then I didn’t feel right about leaving a password out in plain text, so I wrote some crappy encryption using Perlin noise that provides a nice looking figleaf.
Finished the testing sandbox for datadictionary. Its strange, it uploads with some errors about the class object not being there, it doesn’t crash during runtime, but still doesn’t work. It is actually using the class which is having the error to send the serial data back.
Still trying to figure this out. I have decided its not necessary on the arduino side. The DataDictionary will still work in the main sketch so the transfer from the PC side will work fine it just won’t be able to be used in the other classes which don’t really need it considering there is no graphical interface or anything else to interact with on this side.
Rewrote the ComUtil class to work without the DataDictionary.
Upon clicking the compiler error, I found that for some reason it was using a different DataDictionary then the one seen in the project folder. I was able to make the changes and compile.
For some reason Visual Micro is not able to make the objects properly when trying to deploy.
Something went very wrong with Visual Micro, none of my sketches will compile now.
Reinstalled Visual Micro which was actually kinda annoying. Not only did you have to delete it but you also had to go in the setting and disable the mod that did shouldn’t be installed.
Visual Micro is now able to compile working sketches again
The DataDictionary is still making a weird error message. I commented out all the instance of it and found that there are no errors if it is only declared in the main sketch.
Uncommeted the datadictionary in ComUtilB, I still get a weird error message but the sketch seems to be sent.
Setting up a sandbox to test datadictionary from a class. All previous tests were done in the main sketch. I have a feeling it will work but I will still get the weird compiling messages.
revised Budget Details Query so that the navigation is bit easier….
SELECT c.*, a.uid as a_uid, a.amount as amount, o.year, o.year_count, p.duration,
IF(SUM(IF(ISNULL(month_1), 1, 0)) >= 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(month_1), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as month_1_status,
IF(SUM(IF(ISNULL(month_2), 1, 0)) >= 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(month_2), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as month_2_status,
IF(SUM(IF(ISNULL(month_3), 1, 0)) >= 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(month_3), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as month_3_status,
IF(SUM(IF(ISNULL(month_4), 1, 0)) >= 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(month_4), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as month_4_status,
IF(SUM(IF(ISNULL(month_5), 1, 0)) >= 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(month_5), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as month_5_status,
IF(SUM(IF(ISNULL(month_6), 1, 0)) >= 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(month_6), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as month_6_status,
IF(SUM(IF(ISNULL(month_7), 1, 0)) >= 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(month_7), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as month_7_status,
IF(SUM(IF(ISNULL(month_8), 1, 0)) >= 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(month_8), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as month_8_status,
IF(SUM(IF(ISNULL(month_9), 1, 0)) >= 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(month_9), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as month_9_status,
IF(SUM(IF(ISNULL(month_10), 1, 0)) >= 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(month_10), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as month_10_status,
IF(SUM(IF(ISNULL(month_11), 1, 0)) >= 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(month_11), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as month_11_status,
IF(SUM(IF(ISNULL(month_12), 1, 0)) >= 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(month_12), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as month_12_status
FROM budget_centers c, obligations_outlays o, budget_amounts a, appropriations p
WHERE c.project_id = 173
AND c.uid = o.funding_id
AND a.budget_center_id = c.uid
AND a.year = o.year_count
AND c.appropriation = p.type
AND o.type <> ‘Reported Outlay $:’ AND o.type <> ‘Outlay $ (Reported in FACTS)’
GROUP BY o.year, o.year_count
ORDER BY c.uid, o.year, o.year_count
looks like a separate list of current months’ status is needed to handle all/current months navigation…
query
SELECT o.year, o.year_count, o.project_id
IF(SUM(IF(ISNULL(o.month_2), 1, 0)) = 4, ‘OVERDUE’, IF(SUM(IF(ISNULL(o.month_2), 1, 0)) > 0, ‘INCOMPLETE’, ‘CURRENT’)) as status
FROM obligations_outlays o
WHERE o.project_id=172
AND (o.year + o.year_count) = 2013
AND o.type <> ‘Reported Outlay $:’ AND o.type <> ‘Outlay $ (Reported in FACTS)’
GROUP BY year, year_count
Tried creating an HTML page using the eclipse gwt wizards and had the same problem. I’m going to try the tutorial from Google to see if I get any different results.
It seems as though this is a known bug, and has been around for a long time. The fix is to manually create the html.
Though if you create a project with default code in it, all the pieces are created without the widgets and you just need to change the source. Which explains why the bug has been unfixed for so long.
Saving the changed code shows in the browser on refresh. Very cool.
For some reason, the ComUtil class would not include properly. Renamed it ComUtilB and it works again. No idea why I had to do this but it will help keep the arduino and pc versions from getting confused.
The Singleton method of the DataDictionary is not working on the arduino side.
Fixed a few things which were causing compiler errors, still can’t figure out why the singleton method isn’t working
Checked to see if I was having the same problem on the PC side. It seems to be working fine.
Googled “singleton arduino,” apparently it can’t be done in the standard way because the arduino is single threaded. There is a solution which I have yet to try in the second to last post: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1295472760
Ran into a but with the GWT HTML widget where it does not do the generation. A module and an entry point were created first, following the Manning book. (page 47). The buttons enable, but nothing happens. Same behavior on Mike’s machine. Try different orders on Friday?