Changeset 38 in flair-src for trunk/lib/FlairMeta/src/MetaDualShock3_impl.cpp
- Timestamp:
- Jun 23, 2016, 10:15:30 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairMeta/src/MetaDualShock3_impl.cpp
r15 r38 29 29 using namespace flair::meta; 30 30 31 MetaDualShock3_impl::MetaDualShock3_impl(MetaDualShock3 *self, string name) 32 : IODevice((IODevice *)self, name) { 33 joy_ref = new JoyReference(self->GetTab()->NewRow(), "consignes joy"); 31 MetaDualShock3_impl::MetaDualShock3_impl(MetaDualShock3 *self, string name) { 32 joy_ref=new JoyReference(self->controller->GetTab()->NewRow(),"consignes joy"); 34 33 this->self = self; 35 34 joy_init = false; … … 50 49 51 50 // up 52 if (self-> IsButtonPressed(12)) {51 if (self->controller->IsButtonPressed(12)) { 53 52 if (!wasPitchTrimDownButtonPressed) { 54 53 joy_ref->PitchTrimDown(); … … 60 59 61 60 // down 62 if (self-> IsButtonPressed(13)) {61 if (self->controller->IsButtonPressed(13)) { 63 62 if (!wasPitchTrimUpButtonPressed) { 64 63 joy_ref->PitchTrimUp(); … … 70 69 71 70 // right 72 if (self-> IsButtonPressed(15)) {71 if (self->controller->IsButtonPressed(15)) { 73 72 if (!wasRollTrimUpButtonPressed) { 74 73 joy_ref->RollTrimUp(); … … 80 79 81 80 // left 82 if (self-> IsButtonPressed(14)) {81 if (self->controller->IsButtonPressed(14)) { 83 82 if (!wasRollTrimDownButtonPressed) { 84 83 joy_ref->RollTrimDown(); … … 107 106 108 107 if (!joy_init) { 109 self-> TargetEthController::FlashLed(1, 10, 10);108 self->controller->FlashLed(1, 10, 10); 110 109 joy_init = true; 111 110 }
Note:
See TracChangeset
for help on using the changeset viewer.