Changeset 38 in flair-src for trunk/lib/FlairMeta/src/MetaDualShock3.cpp
- Timestamp:
- Jun 23, 2016, 10:15:30 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairMeta/src/MetaDualShock3.cpp
r15 r38 18 18 #include "MetaDualShock3.h" 19 19 #include "MetaDualShock3_impl.h" 20 #include "TargetController.h" 20 21 #include "JoyReference.h" 21 22 #include <Tab.h> … … 30 31 using namespace flair::filter; 31 32 using namespace flair::gui; 33 using namespace flair::sensor; 32 34 33 35 namespace flair { … … 35 37 36 38 MetaDualShock3::MetaDualShock3(FrameworkManager *parent, string name, 37 uint16_t port, uint8_t priority)38 : TargetEthController(parent, name, port, priority) {39 TargetController *controller) 40 : controller(controller),IODevice((IODevice*)controller, name) { 39 41 pimpl_ = new MetaDualShock3_impl(this, name); 40 42 parent->AddDeviceToLog(pimpl_->joy_ref); 41 Start();43 controller->Start(); 42 44 } 43 45 … … 49 51 50 52 void MetaDualShock3::ErrorNotify(void) { 51 TargetEthController::FlashLed(4, 10,0);52 TargetEthController::Rumble(0xff, 20, 0,0);53 controller->FlashLed(4,10,0); 54 controller->Rumble(0xff,20,0,0); 53 55 } 54 56 55 void MetaDualShock3::Rumble(uint8_t left_force, uint8_t left_timeout, 56 uint8_t right_force, uint8_t right_timeout) { 57 TargetEthController::Rumble(left_force, left_timeout, right_force, 58 right_timeout); 57 void MetaDualShock3::Rumble(uint8_t left_force,uint8_t left_timeout,uint8_t right_force,uint8_t right_timeout) { 58 controller->Rumble(left_force,left_timeout,right_force,right_timeout); 59 59 } 60 60 61 61 void MetaDualShock3::SetLedON(unsigned int ledId) { 62 TargetEthController::SetLedOn(ledId);62 controller->SetLedOn(ledId); 63 63 } 64 64 65 65 void MetaDualShock3::SetLedOFF(unsigned int ledId) { 66 TargetEthController::SetLedOff(ledId);66 controller->SetLedOff(ledId); 67 67 } 68 68 69 void MetaDualShock3::FlashLed(unsigned int ledId, uint8_t on_timeout, 70 uint8_t off_timeout) { 71 TargetEthController::FlashLed(ledId, on_timeout, off_timeout); 69 void MetaDualShock3::FlashLed(unsigned int ledId,uint8_t on_timeout,uint8_t off_timeout) { 70 controller->FlashLed(ledId,on_timeout,off_timeout); 72 71 } 73 72 … … 91 90 92 91 float MetaDualShock3::PitchTrim(void) const { 93 return pimpl_->joy_ref->PitchTrim(); 92 return pimpl_->joy_ref->PitchTrim(); 93 } 94 95 void MetaDualShock3::UpdateFrom(const flair::core::io_data *data) { 96 pimpl_->UpdateFrom(data); 94 97 } 95 98
Note:
See TracChangeset
for help on using the changeset viewer.