Modified:
trunk/Changes.txt
wiki/CodingStyles.wiki
Log:
Updated Changes.txt to reflect changes made in revision 192 and updated
CodingStyles.wiki to reflect proper policy on naming constants.
Modified: trunk/Changes.txt
==============================================================================
--- trunk/Changes.txt (original)
+++ trunk/Changes.txt Fri Mar 6 23:04:01 2009
@@ -1,5 +1,5 @@
-------------------------------------------------
-GiiMote Version 3.0 - Feb XX, 2009 - Revision XX
+GiiMote Version 3.0 - xxx XX, 2009 - Revision XX
-------------------------------------------------
Breaking Changes:
@@ -18,6 +18,12 @@
wm_num_exists()
wm_connect_all()
wm_disconnect_all()
+wm_drum_check_button()
+wm_drum_get_velocity()
+wm_drum_rawx()
+wm_drum_rawy()
+wm_drum_xpos()
+wm_drum_ypos()
wm_get_battery_raw()
wm_get_id()
wm_get_guid()
@@ -102,6 +108,7 @@
wm_touch_yellow
wm_strum_down
wm_strum_up
+wm_pedal
bb_btmleft
bb_btmright
bb_topleft
Modified: wiki/CodingStyles.wiki
==============================================================================
--- wiki/CodingStyles.wiki (original)
+++ wiki/CodingStyles.wiki Fri Mar 6 23:04:01 2009
@@ -1,96 +1,96 @@
-#summary The coding styles used in GiiMote.
-#labels Phase-Design,Phase-Implementation,Type-Article
-
-= Introduction =
-
-This document gives a general outline and overview of the coding styles
used in GiiMote.
-
-Before sending in a patch or piece of code for review please refer to this
document and make sure your code complies with the recommendations set
forth herein.
-
-
-= General Practices =
- * Make sure your code does not throw warnings or errors.
- * Ensure compatibility with 64-bit hardware.
- * Use "interCaps" for symbols.
- * Use "const" instead of a macro
- for example:
- {{{
- #define BTN_PLUS 8 // This is wrong
- const int BTN_PLUS = 8; // This is right
- }}}
- * Do not create null pointers.
-
-= Pointers =
- * Cleanup the heap after yourself when declaring objects.
-
-= Aesthetics =
- * Use proper .NET syntax (new style).
- * Use attributes instead of methods when possible.
- * Use Java-style constants, for example:
- {{{
- const int ERROR_NO_IR = -100;
- }}}
- * No white space at the end of a line
- * Use the Allman indent style for control structures. For example:
- {{{
-if (...)
-{
- (...)
-}
-else
-{
- (...)
-}
-
-while (...)
-{
- (...)
-}
-
-do
-{
- (...)
-} while (...);
-
-for (...; ...; ...)
-{
- (...)
-}
-
-switch (...)
-{
- case 1:
- {
- // When you need to declare a variable in a switch, put the block in
braces
- int var;
- }
- break;
- case 2:
- (...)
- break;
- default:
- break;
-}
- }}}
- * Declare methods outside of classes when classes become large.
-
-= Error Handling =
- * Place try-catch statements around everything which interfaces directly
with the hardware or can return an error.
- * Do not let errors break the logical progression of your code. Add
error checking as a separate entity in the code, do not incorporate it into
logic. For example:
- {{{
- // Do not do this:
- if (noError(foobar) && foobar.boolean)
- {
- foobar.setBoolean(false);
- }
-
- // Do this:
- if (isError(foobar)) return (foobar.lastError());
- if (foobar.boolean)
- {
- foobar.setBoolean(false);
- }
- }}}
-
-
+#summary The coding styles used in GiiMote.
+#labels Phase-Design,Phase-Implementation,Type-Article
+
+= Introduction =
+
+This document gives a general outline and overview of the coding styles
used in GiiMote.
+
+Before sending in a patch or piece of code for review please refer to this
document and make sure your code complies with the recommendations set
forth herein.
+
+
+= General Practices =
+ * Make sure your code does not throw warnings or errors.
+ * Ensure compatibility with 64-bit hardware.
+ * Use "interCaps" for symbols.
+ * Use "const" instead of a macro
+ for example:
+ {{{
+ #define btnPlus 8 // This is wrong
+ const int btnPlus = 8; // This is right
+ }}}
+ * Do not create null pointers.
+
+= Pointers =
+ * Cleanup the heap after yourself when declaring objects.
+
+= Aesthetics =
+ * Use proper .NET syntax (new style).
+ * Use attributes instead of methods when possible.
+ * Use "interCaps" for constants, for example:
+ {{{
+ const int errorNoIR = -100;
+ }}}
+ * No white space at the end of a line
+ * Use the Allman indent style for control structures. For example:
+ {{{
+if (...)
+{
+ (...)
+}
+else
+{
+ (...)
+}
+
+while (...)
+{
+ (...)
+}
+
+do
+{
+ (...)
+} while (...);
+
+for (...; ...; ...)
+{
+ (...)
+}
+
+switch (...)
+{
+ case 1:
+ {
+ // When you need to declare a variable in a switch, put the block in
braces
+ int var;
+ }
+ break;
+ case 2:
+ (...)
+ break;
+ default:
+ break;
+}
+ }}}
+ * Declare methods outside of classes when classes become large.
+
+= Error Handling =
+ * Place try-catch statements around everything which interfaces directly
with the hardware or can return an error.
+ * Do not let errors break the logical progression of your code. Add
error checking as a separate entity in the code, do not incorporate it into
logic. For example:
+ {{{
+ // Do not do this:
+ if (noError(foobar) && foobar.boolean)
+ {
+ foobar.setBoolean(false);
+ }
+
+ // Do this:
+ if (isError(foobar)) return (foobar.lastError());
+ if (foobar.boolean)
+ {
+ foobar.setBoolean(false);
+ }
+ }}}
+
+
|| Adapted from the "Mozilla Coding Style Guide" ||