svcd unsubscribe#38
svcd unsubscribe#38mccormickt12 wants to merge 10 commits intoUCB-IoET:masterfrom mccormickt12:master
Conversation
Merge branch 'master' of https://github.com/UCB-IoET/ioet_contrib
|
sorry about the terrible git use. The svcd file is at the bottom of all the changed files |
|
Looks good; but add a return statement! Looks like the function should be returning an int. I think you should be returning 0 to indicate that you want 0 return values from the function. |
There was a problem hiding this comment.
You need to register your function at the beginning of this file under SVCD_SYMBOLS. There is a template for the init function already so you just need to follow it.
PB4J
|
You can try the instructions I detailed here to get a fresh pull request with only the svcd.c changes without having to do any complex git commands |
|
@Michaelhobo The implementation of Lua that runs on Storm doesn't support floating point numbers at all. Everything is an integer. So I doubt that lua_Number would be a double in this case. -men in #000000 |
|
Some of the chunks could be abstracted into functions. For example: -- BIRDPEOPLE |
There was a problem hiding this comment.
I don't see why we should push a string "msg" to the stack. Although msg is the name of the array variable, it is never needed for it to be represented this way. Moreover, if you want to push the same string "msg" twice, it would be more memory efficient to save it as a constant array and push it twice.
Untitled
|
This pull request is not at all in the spirit of feature branches and pull requests in general. When you are submitting your final pull request (due 11:59 tonight) please make sure to only submit changes related to the SVCD work, not every other file you have changed. |
There was a problem hiding this comment.
This is a merge conflict. You should never commit code with an unresolved merge conflict
|
You are using storm array functions, which is acceptable as that is what is found in the lua, but it is not the most efficient. The reason we are using those functions in lua is because we lack the ability to work with raw bytes in a string, setting them as numbers. In C you are free to create the message just using a uint8_t array and setting the bytes in the array directly. This is much faster than using the storm array functions. |
|
This has been superceded by #42 |
not really sure how to do this... i think i submitted everything ive done for a pull request...