SWAPmaker, new source code generator for developers

35 views
Skip to first unread message

Daniel Berenguer

unread,
May 25, 2012, 7:54:48 PM5/25/12
to pans...@googlegroups.com
http://www.panstamp.com/announcements/swapmakersimplifyingnewdevelopments

I'll need your help for validating this tool. Too many combinations...
Please feel free to use it in your current developments and report
problems back into this mailing list.

Link to the wiki page:
http://code.google.com/p/panstamp/wiki/SWAPmaker

Thanks!

Paolo Di Prodi

unread,
May 25, 2012, 8:23:18 PM5/25/12
to pans...@googlegroups.com
Yes sure will try to use on my device definition.
--
Dr. Paolo Di Prodi

Paolo Di Prodi

unread,
May 28, 2012, 7:37:55 AM5/28/12
to pans...@googlegroups.com
Hello, I have spot some errors and some suggestions.
In the Product Information:
developer ID states that is either the decimal value or the hex value.
in product name you can trim automagically spaces rather than saying single word

In the configuration registers:
every register I add goes into type=out, this is misleading as configuration registers can be both
be read or written right?

in the register editor I would say change "New" to "Add" .

Now here's the fun after I have added a Reg ID, say the first one 11, I get the following error on the console:
robomotic@optimus:~/CodeRepository/BaseStation/Seismo/swapmaker$ python swapmaker.py
Traceback (most recent call last):
  File "/home/robomotic/CodeRepository/BaseStation/Seismo/swapmaker/wizard.py", line 261, in button_edit_pressed
    dialog = CfgRegisterDialog(self, self.registers[index]["id"], self.registers[index]["name"], self.registers[index]["parameters"])
  File "/home/robomotic/CodeRepository/BaseStation/Seismo/swapmaker/dialogs.py", line 325, in __init__
    RegisterDialog.__init__(self, parent, regid, regname, parameters)
  File "/home/robomotic/CodeRepository/BaseStation/Seismo/swapmaker/dialogs.py", line 242, in __init__
    self.list_parameters.SetStringItem(index, 2, param["dir"])
KeyError: 'dir'

when I try to edit it.
See screenshot.

I can however continue in the next section that has the same bug when I try to edit it:

Traceback (most recent call last):
  File "/home/robomotic/CodeRepository/BaseStation/Seismo/swapmaker/wizard.py", line 263, in button_edit_pressed
    dialog = RegRegisterDialog(self, self.registers[index]["id"], self.registers[index]["name"], self.registers[index]["endpoints"])
KeyError: 'endpoints'

At the end when I try to save the XML definition, a warning starts:

Unable to save /home/robomotic/CodeRepository/BaseStation/Seismo/swapmaker/output/WristWatch.xml

I went to check the file which actually exist, but is empty inside!

Let me know if you need more info to find out what causes the problem.

Cheers.
Robomotic ltd
www.robomotic.com

Address:
CIDS Incubator, Room 203
University Avenue
Thomson Building
Glasgow, G12 8QQ
UK

This email and any attachments are confidential and should not be read, copied or disclosed to anyone other than the intended recipient without the permission of the sender. Robomotic Limited does not accept liability for any loss or damage which may result from this email or any attachment, or for errors or omissions arising after it was sent. The views expressed in this email are those of the author and do not necessarily reflect the views of Robomotic Limited. If you have received this message in error, please notify the sender immediately and delete the material from any computer.

Robomotic Ltd is a limited company registered in Scotland no. SC389778
swapmaker.png

Daniel Berenguer

unread,
May 28, 2012, 6:11:21 PM5/28/12
to pans...@googlegroups.com
Thanks Paolo.

> In the Product Information:
> developer ID states that is either the decimal value or the hex value.

Always decimal. Appended (DEC) to developer id and product id labels

> in product name you can trim automagically spaces rather than saying single
> word

Added to the to-do list

> In the configuration registers:
> every register I add goes into type=out, this is misleading as configuration
> registers can be both
> be read or written right?

Config parameters are always outputs since they need to be written
(and also read) from the outside

> in the register editor I would say change "New" to "Add" .

Done

As for the errors, they have been solved. SWAPmaker has been updated on SVN.

--
Daniel Berenguer
http://www.panstamp.com
http://www.usapiens.com
Reply all
Reply to author
Forward
0 new messages