Changeset 339 in flair-src for trunk/lib/FlairSimulator/src/X4.cpp


Ignore:
Timestamp:
Nov 28, 2019, 8:59:49 AM (2 years ago)
Author:
Sanahuja Guillaume
Message:

allow all blade rotations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSimulator/src/X4.cpp

    r214 r339  
    124124
    125125  fl_blade = new Blade(this, vector3df(70.71, -70.71, 17.5));
    126   fr_blade = new Blade(this, vector3df(70.71, 70.71, 17.5), true);
    127   rl_blade = new Blade(this, vector3df(-70.71, -70.71, 17.5), true);
     126  fr_blade = new Blade(this, vector3df(70.71, 70.71, 17.5), vector3df(0, 0, 0),true);
     127  rl_blade = new Blade(this, vector3df(-70.71, -70.71, 17.5),  vector3df(0, 0, 0),true);
    128128  rr_blade = new Blade(this, vector3df(-70.71, 70.71, 17.5));
    129129
     
    136136void X4::AnimateModel(void) {
    137137  motor_speed_mutex->GetMutex();
    138   fl_blade->SetRotationSpeed(K_MOT * motor_speed[0]);
    139   fr_blade->SetRotationSpeed(-K_MOT * motor_speed[1]);
    140   rl_blade->SetRotationSpeed(-K_MOT * motor_speed[2]);
    141   rr_blade->SetRotationSpeed(K_MOT * motor_speed[3]);
     138  fl_blade->SetRotationSpeed(K_MOT *vector3df(0, 0, motor_speed[0]));
     139  fr_blade->SetRotationSpeed(-K_MOT *vector3df(0, 0, motor_speed[1]));
     140  rl_blade->SetRotationSpeed(-K_MOT *vector3df(0, 0, motor_speed[2]));
     141  rr_blade->SetRotationSpeed(K_MOT *vector3df(0, 0, motor_speed[3]));
    142142  motor_speed_mutex->ReleaseMutex();
    143143
Note: See TracChangeset for help on using the changeset viewer.