Browse Source

smartdrive: build example and add manufacturer to list

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Mihai Tudor Panu 8 years ago
parent
commit
49611e5ac0
4 changed files with 13 additions and 5 deletions
  1. 1
    0
      examples/c++/CMakeLists.txt
  2. 3
    1
      examples/c++/smartdrive.cxx
  3. 3
    4
      src/smartdrive/smartdrive.h
  4. 6
    0
      src/upm.h

+ 1
- 0
examples/c++/CMakeLists.txt View File

@@ -254,6 +254,7 @@ add_example (teams)
254 254
 add_example (apa102)
255 255
 add_example (tex00)
256 256
 add_example (bmi160)
257
+add_example (smartdrive)
257 258
 
258 259
 # These are special cases where you specify example binary, source file and module(s)
259 260
 include_directories (${PROJECT_SOURCE_DIR}/src)

+ 3
- 1
examples/c++/smartdrive.cxx View File

@@ -48,7 +48,8 @@ main(int argc, char **argv)
48 48
 
49 49
     std::cout << "SmartDrive demo is starting. Please make sure drive is connected to board" << std::endl;
50 50
     sleep(2); //Wait for 2 seconds in case you want to fix your h/w setup
51
-
51
+    
52
+    //! [Interesting]
52 53
     // Instantiate a SmartDrive connected to /dev/i2c-0 bus, using DefaultAddress
53 54
     drive = new upm::SmartDrive(0);
54 55
 
@@ -63,6 +64,7 @@ main(int argc, char **argv)
63 64
     sleep(2); //Sleep for 2 seconds
64 65
     //Stop motor M2 and then finish program
65 66
     drive->StopMotor(SmartDrive_Motor_ID_2, SmartDrive_Action_BrakeHold);
67
+    //! [Interesting]
66 68
 
67 69
     std::cout << "Demo complete. GoodBye" << std::endl;
68 70
 

+ 3
- 4
src/smartdrive/smartdrive.h View File

@@ -117,10 +117,10 @@
117 117
 #define SmartDrive_MOTOR_CONTROL_ON        0x1
118 118
 #define SmartDrive_MOTOR_IS_RAMPING        0x2
119 119
 #define SmartDrive_MOTOR_IS_POWERED        0x4
120
-#define SmartDrive_MOTOR_POS_CTRL_ON    0x8
121
-#define SmartDrive_MOTOR_IN_BRAKE_MODE    0x10
120
+#define SmartDrive_MOTOR_POS_CTRL_ON       0x8
121
+#define SmartDrive_MOTOR_IN_BRAKE_MODE     0x10
122 122
 #define SmartDrive_MOTOR_OVERLOADED        0x20
123
-#define SmartDrive_MOTOR_IN_TIME_MODE    0x40
123
+#define SmartDrive_MOTOR_IN_TIME_MODE      0x40
124 124
 #define SmartDrive_MOTOR_IS_STALLED        0x80
125 125
 
126 126
 namespace upm {
@@ -146,7 +146,6 @@ namespace upm {
146 146
  *
147 147
  * This module has been tested on the SmartDrive.
148 148
  *
149
- * @image html smartdrive.jpeg
150 149
  * @snippet smartdrive.cxx Interesting
151 150
  */
152 151
 //Class definition

+ 6
- 0
src/upm.h View File

@@ -425,6 +425,12 @@
425 425
  * @defgroup amphenol Amphenol
426 426
  * @ingroup byman
427 427
  */
428
+ 
429
+/**
430
+ * @brief Open Electrons
431
+ * @defgroup openelectrons Open Electrons
432
+ * @ingroup byman
433
+ */ 
428 434
 
429 435
 ////////////////////////////////////////////////////////////////// @cond KIT
430 436
 /// Groups for the various Starter Kits.