Changeset 15 in flair-src for trunk/lib/FlairMeta/src/MetaDualShock3.cpp


Ignore:
Timestamp:
Apr 8, 2016, 3:40:57 PM (5 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairMeta/src/MetaDualShock3.cpp

    r10 r15  
    3131using namespace flair::gui;
    3232
    33 namespace flair { namespace meta {
     33namespace flair {
     34namespace meta {
    3435
    35 MetaDualShock3::MetaDualShock3(FrameworkManager* parent,string name,uint16_t port,uint8_t priority) : TargetEthController(parent,name,port,priority) {
    36     pimpl_=new MetaDualShock3_impl(this,name);
    37     parent->AddDeviceToLog(pimpl_->joy_ref);
    38     Start();
     36MetaDualShock3::MetaDualShock3(FrameworkManager *parent, string name,
     37                               uint16_t port, uint8_t priority)
     38    : TargetEthController(parent, name, port, priority) {
     39  pimpl_ = new MetaDualShock3_impl(this, name);
     40  parent->AddDeviceToLog(pimpl_->joy_ref);
     41  Start();
    3942}
    4043
    41 MetaDualShock3::~MetaDualShock3() {
    42     delete pimpl_;
    43 }
     44MetaDualShock3::~MetaDualShock3() { delete pimpl_; }
    4445
    45 AhrsData* MetaDualShock3::GetReferenceOrientation(void) const {
    46     return pimpl_->joy_ref->GetReferenceOrientation();
     46AhrsData *MetaDualShock3::GetReferenceOrientation(void) const {
     47  return pimpl_->joy_ref->GetReferenceOrientation();
    4748}
    4849
    4950void MetaDualShock3::ErrorNotify(void) {
    50     TargetEthController::FlashLed(4,10,0);
    51     TargetEthController::Rumble(0xff,20,0,0);
     51  TargetEthController::FlashLed(4, 10, 0);
     52  TargetEthController::Rumble(0xff, 20, 0, 0);
    5253}
    5354
    54 void MetaDualShock3::Rumble(uint8_t left_force,uint8_t left_timeout,uint8_t right_force,uint8_t right_timeout) {
    55     TargetEthController::Rumble(left_force,left_timeout,right_force,right_timeout);
     55void 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);
    5659}
    5760
    5861void MetaDualShock3::SetLedON(unsigned int ledId) {
    59     TargetEthController::SetLedOn(ledId);
     62  TargetEthController::SetLedOn(ledId);
    6063}
    6164
    6265void MetaDualShock3::SetLedOFF(unsigned int ledId) {
    63     TargetEthController::SetLedOff(ledId);
     66  TargetEthController::SetLedOff(ledId);
    6467}
    6568
    66 void MetaDualShock3::FlashLed(unsigned int ledId,uint8_t on_timeout,uint8_t off_timeout) {
    67     TargetEthController::FlashLed(ledId,on_timeout,off_timeout);
     69void MetaDualShock3::FlashLed(unsigned int ledId, uint8_t on_timeout,
     70                              uint8_t off_timeout) {
     71  TargetEthController::FlashLed(ledId, on_timeout, off_timeout);
    6872}
    6973
    70 float MetaDualShock3::ZRef(void) const {
    71     return pimpl_->joy_ref->ZRef();
    72 }
     74float MetaDualShock3::ZRef(void) const { return pimpl_->joy_ref->ZRef(); }
    7375
    74 float MetaDualShock3::DzRef(void) const {
    75     return pimpl_->joy_ref->DzRef();
    76 }
     76float MetaDualShock3::DzRef(void) const { return pimpl_->joy_ref->DzRef(); }
    7777
    7878void MetaDualShock3::SetYawRef(float value) {
    79     pimpl_->joy_ref->SetYawRef(value);
     79  pimpl_->joy_ref->SetYawRef(value);
    8080}
    8181
    8282void MetaDualShock3::SetYawRef(Quaternion const &value) {
    83     pimpl_->joy_ref->SetYawRef(value);
     83  pimpl_->joy_ref->SetYawRef(value);
    8484}
    8585
    86 void MetaDualShock3::SetZRef(float value) {
    87     pimpl_->joy_ref->SetZRef(value);
    88 }
     86void MetaDualShock3::SetZRef(float value) { pimpl_->joy_ref->SetZRef(value); }
    8987
    9088float MetaDualShock3::RollTrim(void) const {
    91     return pimpl_->joy_ref->RollTrim();
     89  return pimpl_->joy_ref->RollTrim();
    9290}
    9391
    9492float MetaDualShock3::PitchTrim(void) const {
    95     return pimpl_->joy_ref->PitchTrim();
     93  return pimpl_->joy_ref->PitchTrim();
    9694}
    9795
Note: See TracChangeset for help on using the changeset viewer.