Closed cHemingway closed 4 years ago
Hey, any thoughts on this pull request? Anything I can do to improve it?
Thank you very much @cHemingway ! I would love to hear about your experience with this JavaScript API, and how hard (or easy) it was to use it?
Hi @ikalogic !
Thanks! I have another branch with packet supported added (works with NOR too), I will check if it is up to scratch for a pull request.
Its been a bit of a while, so I might have forgotten some things, but generally my thoughts on the JS API are that is is perfectly servicable, though not too friendly for beginners.
Once I have created a dec_item or packet_item (I have another branch with packet support), I can't change it later. It would be nice to be able to access it later to change the color if I parse the packet further and find an error. Otherwise, I need to store a stack of items and pop them on/off as needed. A simple way to do this would be to have ScanaStudio.packet_view_add_packet
or ScanaStudio.dec_item_new
return an object with attributes/functions to change the properties, I think this would simplify the logic a lot.
The interface to read gui values, ScanaStudio.gui_get_value("name")
is a bit long to type, which is presumable why the original script sets a lot of global variables instead via read_gui_values
Maybe a function to get them all in an object, indexed by ID? e.g:
g_args = ScanaStudio.gui_get_all_values();
g_args["cpol"]; // Gets cpol argument
g_args["flash_type"]; // Gets flash type
g_args["unknown_arg"]; // returns undefined
// And therefore I can write
if (g_args["my_value"] != null) {
ScanaStudio.console_info_msg("Got my_value: " + g_args["my_value"]);
}
If I don't implement the packet view, navigating between data sent with big gaps in between requires me to zoom out, scroll along, and zoom back in. With the packet view, I still need to double click on each packet to see it, the arrow keys move through the list of packets but <enter>
does nothing. It would be nice if I could use the arrow keys to go to the next/previous packet or group of signals?
[object Object]
. Some more console functions e.g. Google Chrome's console.dir(object)
could be nice?@cHemingway Thank you very much for this detailed response.
Your ideas are excellent, and we will implement them, alongside other features being added.
Support for Micron MT29F 60 series NAND SPI flash. I have tested most commands, apart from dual/quad. Also added an option to enumarate each data byte, useful with long payloads.