mirror of
				https://github.com/eclipse/upm.git
				synced 2025-10-31 15:15:07 +03:00 
			
		
		
		
	smartdrive: build example and add manufacturer to list
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
		| @@ -254,6 +254,7 @@ add_example (teams) | |||||||
| add_example (apa102) | add_example (apa102) | ||||||
| add_example (tex00) | add_example (tex00) | ||||||
| add_example (bmi160) | add_example (bmi160) | ||||||
|  | add_example (smartdrive) | ||||||
|  |  | ||||||
| # These are special cases where you specify example binary, source file and module(s) | # These are special cases where you specify example binary, source file and module(s) | ||||||
| include_directories (${PROJECT_SOURCE_DIR}/src) | include_directories (${PROJECT_SOURCE_DIR}/src) | ||||||
|   | |||||||
| @@ -48,7 +48,8 @@ main(int argc, char **argv) | |||||||
|  |  | ||||||
|     std::cout << "SmartDrive demo is starting. Please make sure drive is connected to board" << std::endl; |     std::cout << "SmartDrive demo is starting. Please make sure drive is connected to board" << std::endl; | ||||||
|     sleep(2); //Wait for 2 seconds in case you want to fix your h/w setup |     sleep(2); //Wait for 2 seconds in case you want to fix your h/w setup | ||||||
|  |      | ||||||
|  |     //! [Interesting] | ||||||
|     // Instantiate a SmartDrive connected to /dev/i2c-0 bus, using DefaultAddress |     // Instantiate a SmartDrive connected to /dev/i2c-0 bus, using DefaultAddress | ||||||
|     drive = new upm::SmartDrive(0); |     drive = new upm::SmartDrive(0); | ||||||
|  |  | ||||||
| @@ -63,6 +64,7 @@ main(int argc, char **argv) | |||||||
|     sleep(2); //Sleep for 2 seconds |     sleep(2); //Sleep for 2 seconds | ||||||
|     //Stop motor M2 and then finish program |     //Stop motor M2 and then finish program | ||||||
|     drive->StopMotor(SmartDrive_Motor_ID_2, SmartDrive_Action_BrakeHold); |     drive->StopMotor(SmartDrive_Motor_ID_2, SmartDrive_Action_BrakeHold); | ||||||
|  |     //! [Interesting] | ||||||
|  |  | ||||||
|     std::cout << "Demo complete. GoodBye" << std::endl; |     std::cout << "Demo complete. GoodBye" << std::endl; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -117,10 +117,10 @@ | |||||||
| #define SmartDrive_MOTOR_CONTROL_ON        0x1 | #define SmartDrive_MOTOR_CONTROL_ON        0x1 | ||||||
| #define SmartDrive_MOTOR_IS_RAMPING        0x2 | #define SmartDrive_MOTOR_IS_RAMPING        0x2 | ||||||
| #define SmartDrive_MOTOR_IS_POWERED        0x4 | #define SmartDrive_MOTOR_IS_POWERED        0x4 | ||||||
| #define SmartDrive_MOTOR_POS_CTRL_ON    0x8 | #define SmartDrive_MOTOR_POS_CTRL_ON       0x8 | ||||||
| #define SmartDrive_MOTOR_IN_BRAKE_MODE    0x10 | #define SmartDrive_MOTOR_IN_BRAKE_MODE     0x10 | ||||||
| #define SmartDrive_MOTOR_OVERLOADED        0x20 | #define SmartDrive_MOTOR_OVERLOADED        0x20 | ||||||
| #define SmartDrive_MOTOR_IN_TIME_MODE    0x40 | #define SmartDrive_MOTOR_IN_TIME_MODE      0x40 | ||||||
| #define SmartDrive_MOTOR_IS_STALLED        0x80 | #define SmartDrive_MOTOR_IS_STALLED        0x80 | ||||||
|  |  | ||||||
| namespace upm { | namespace upm { | ||||||
| @@ -146,7 +146,6 @@ namespace upm { | |||||||
|  * |  * | ||||||
|  * This module has been tested on the SmartDrive. |  * This module has been tested on the SmartDrive. | ||||||
|  * |  * | ||||||
|  * @image html smartdrive.jpeg |  | ||||||
|  * @snippet smartdrive.cxx Interesting |  * @snippet smartdrive.cxx Interesting | ||||||
|  */ |  */ | ||||||
| //Class definition | //Class definition | ||||||
|   | |||||||
| @@ -425,6 +425,12 @@ | |||||||
|  * @defgroup amphenol Amphenol |  * @defgroup amphenol Amphenol | ||||||
|  * @ingroup byman |  * @ingroup byman | ||||||
|  */ |  */ | ||||||
|  |   | ||||||
|  | /** | ||||||
|  |  * @brief Open Electrons | ||||||
|  |  * @defgroup openelectrons Open Electrons | ||||||
|  |  * @ingroup byman | ||||||
|  |  */  | ||||||
|  |  | ||||||
| ////////////////////////////////////////////////////////////////// @cond KIT | ////////////////////////////////////////////////////////////////// @cond KIT | ||||||
| /// Groups for the various Starter Kits. | /// Groups for the various Starter Kits. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Mihai Tudor Panu
					Mihai Tudor Panu