Search found 203 matches

by Mis
Sat Feb 22, 2014 9:59 pm
Forum: Software development
Topic: Output.cpp "=" instead of "|=" and "&="
Replies: 9
Views: 868

Re: Output.cpp "=" instead of "|=" and "&="

Plushi.
You're absolutly right. Most of this | and & is totally nonsense. And plenty of flash size is not an excuse for these nonsenses.
by Mis
Mon Nov 18, 2013 12:24 am
Forum: Ideas
Topic: Integration of SRF08 I2C sonar sensor (done)
Replies: 89
Views: 44016

Re: Integration of SRF08 I2C sonar sensor (done)

My idea of SONAR+BARO fusion: #if(SONAR) // BARO+SONAR Fusion if(sonarAlt > 0 && f.SMALL_ANGLES_25) { // use sonar only if valid sonar data, and with inclinations below 25 degres float ratio = (SONAR_BARO_FUSION_HC-sonarAlt)/(SONAR_BARO_FUSION_HC-SONAR_BARO_FUSION_LC); // baro/sonar ratio ra...
by Mis
Sun Nov 17, 2013 11:57 pm
Forum: Software development
Topic: I2C speed setting
Replies: 4
Views: 1436

Re: I2C speed setting

My idea is removing all "TWBR = ((F_CPU / 400000L) - 16) / 2;" in sensors local code. Then if config.h says 400kHz - all communicacions is done at 400kHz. If some sensors can't work with 400kHz we should slow down ALL communications to 100kHz (via config.h declaration), because during comm...
by Mis
Tue Nov 12, 2013 11:56 pm
Forum: Software development
Topic: Helicopter integration
Replies: 318
Views: 45745

Re: Helicopter integration

servo[7] = SERVO8 in GUI - this is motor output for heli/aeroplane
servo[6] = SERVO7 in GUI - this is COLLECTIVE servo in heli 90
by Mis
Tue Nov 12, 2013 9:56 pm
Forum: Software development
Topic: Helicopter integration
Replies: 318
Views: 45745

Re: Helicopter integration

Set SERVO7 rate to 0 and you get the same effect.
by Mis
Tue Nov 12, 2013 1:42 pm
Forum: Software development
Topic: 2.3 is finally here :)
Replies: 97
Views: 79634

Re: 2.3 is finally here :)

Slide the MID slider max to left, and... you get it :)
by Mis
Sun Nov 10, 2013 4:07 pm
Forum: Software development
Topic: 2.3 is finally here :)
Replies: 97
Views: 79634

Re: 2.3 is finally here :)

redscorpio wrote:what happened to the "#define TILT_PITCH_AUX_CH AUX4 line"?
Use GUI for setup gimbal and AUX channels for gimbal control.
by Mis
Sat Oct 12, 2013 8:54 am
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

part2: > if (i != 5) // not limit YawMotor Why? I don't see it being constrained anywhere else in the code. This is taken from old multiwii 2.1 helicopter code. The yawmotor can be set to mincommand during disarmed, but after constrain to servo.min (the lower value of servo.min is 1020) the yawmoto...
by Mis
Fri Oct 11, 2013 2:06 pm
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

The rate value have two different meanings. With some cases (e.g airplane) the rate value is exactly the single servo rate with -128 .. +127 value. This define single servo amplify and servo direction. In other cases (e.g flying wing) the rate value work only as reverse flags. Rate value can store u...
by Mis
Wed Oct 09, 2013 10:56 pm
Forum: Software development
Topic: Anyone uses TinyGPS and GPSfromOSD ? Could we remove ?
Replies: 7
Views: 1075

Re: Anyone uses TinyGPS and GPSfromOSD ? Could we remove ?

Mis introduced GPSfromOSD mainly to support MISOSD with a standalone GPS device. Is there someone who currently uses it like this ? For now, it is only usable with m328 boards, but the code size is too high in most cases. Better solution is drop this option. And best solution is drop support for ug...
by Mis
Tue Oct 08, 2013 2:50 pm
Forum: Software development
Topic: Maybe two little (long-time) bugs found
Replies: 5
Views: 655

Re: Maybe two little (long-time) bugs found

About first bug. The previousTime variable is used only for cycle time calculation, and not have any other purpose. No dangerous problem if is overflowed.
by Mis
Mon Oct 07, 2013 5:50 pm
Forum: Software development
Topic: small angles 25deg alternative solution
Replies: 6
Views: 3673

Re: small angles 25deg alternative solution

But this optimisation is buggy.
If the copter is upside down, the f.SMALL_ANGLES_25 is 1, but should be 0.

Propper code (remove abs):

Code: Select all

  if ((int16_t)EstG32.A[2] > ACCZ_25deg)
    f.SMALL_ANGLES_25 = 1;
  else
    f.SMALL_ANGLES_25 = 0;
by Mis
Mon Sep 30, 2013 6:59 pm
Forum: Software development
Topic: Release v2.3 is coming soon... prepare
Replies: 96
Views: 22587

Re: Release v2.3 is coming soon... prepare

Don't work with Poti on Radio.

Start GUI, go to settibgs tab and assign AUX channel for SERVO1 middle position.
by Mis
Mon Sep 30, 2013 6:47 pm
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

This is high level of "C" coding : value = condition ? value_if_true : value_if_false; This is easy If sevo[nr].middle have value less than RC_CHANS (e.g 0..11) this function return value from rc channel table indexed by servo[nr].middle. Example: If servo.middle have value of 5, then this...
by Mis
Wed Sep 04, 2013 8:13 pm
Forum: Ideas
Topic: Voltage measuring
Replies: 29
Views: 3929

Re: Voltage measuring

Ekhem, the conf.vbatscale variable is 8-bit type...
by Mis
Tue Sep 03, 2013 9:07 pm
Forum: Ideas
Topic: Voltage measuring
Replies: 29
Views: 3929

Re: Voltage measuring

resistor divider values are known

Yes, but with 5% tolerance.

adcref voltage is known

Theoretically yes, but fuc..g atmels have big initial vref tolerance. Really.

5% tolerance give about 0.5V readout error. Not important ? Calibration is stupid ? OK, start killing your LiPo's now.
by Mis
Tue Sep 03, 2013 3:34 pm
Forum: Software development
Topic: The receiver with lost control setting & RTH with altitude
Replies: 12
Views: 1242

Re: The receiver with lost control setting & RTH with altitu

Instead your poor method, set the failsafe in receiver to 980us pulse on throttle channel (extern endpoint and subtrim for get 980us on throttle then save this value in receiver). Now the FC will be informed about signal lost, and internal MWC failsafe procedure should work.
by Mis
Sat Aug 31, 2013 1:13 pm
Forum: Software development
Topic: GPS NAV
Replies: 964
Views: 191433

Re: GPS NAV

EOS, my five cents...
1. Instead of additional MISSION BOX maybe you can use existing boxes ? Simply turn on both HOLD and HOME boxes in the same time start the mission.
2. Parametr altitude should be signed for allow flying to points below take-off altitude.
by Mis
Thu Aug 29, 2013 9:07 pm
Forum: Software development
Topic: SBUS center at 1488
Replies: 10
Views: 4219

Re: SBUS center at 1488

This way not work. You inverting only data bits. Not the start and stop bits in serial transmision. In this case the serial receiver not work propertly.
by Mis
Fri Aug 23, 2013 1:12 pm
Forum: Software development
Topic: Airplane mode
Replies: 512
Views: 90651

Re: Airplane mode

I have other solution for arming/disarming. I added one counter in software (work only in plane mode), then reset this counter at arm, and increase by 1 in each RC loop if throttle stick is above MINCHECK. Then if counter value is higher than 500 I block disarming possibility. Now you can normally a...
by Mis
Wed Jul 24, 2013 9:46 pm
Forum: Software development
Topic: MSP_COMP_GPS direction, does it use MAG ?
Replies: 6
Views: 492

Re: MSP_COMP_GPS direction, does it use MAG ?

GPS_directionToHome is direction calculated only from position deviation. This NOT include current course from GPS nor copter orientation from MAG.
If you want display arrow to home on OSD you must use GPS_directionToHome together with MAG heading or GPS_Course.
by Mis
Wed Jul 24, 2013 2:16 am
Forum: Software development
Topic: Building MultiWii in Eclipse
Replies: 25
Views: 3883

Re: Building MultiWii in Eclipse

Simple add void Sonar_update(); line to sensors.h file before "void initSensors();" line. And one more for others... Please dont use conditional macros (#if defined....) in header files. Forward definitions of non existing functions not generate any warnings or errors, nor affect the resul...
by Mis
Wed Jul 24, 2013 2:02 am
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

Alex, your change in output.cpp ( "servo[5] = constrain(..." ) is not needed. The constrain is done with "for(i=SERVO_START-1; i<SERVO_END; i++) {" loop. servo[i] = constrain(servo[i], conf.servoConf[i].min, conf.servoConf[i].max); // limit the values The servo[5] limits is only ...
by Mis
Wed Jul 17, 2013 11:51 pm
Forum: Software development
Topic: possible confusion on baud rate options
Replies: 1
Views: 1261

Re: possible confusion on baud rate options

Yes, the #define GPS_BAUD 57600 override prevous serial baudrate for GPS serial port.
by Mis
Wed Jun 26, 2013 12:17 am
Forum: Software development
Topic: V2.2 - ACRO PID implementation is wrong, right?
Replies: 282
Views: 107259

Re: V2.2 - ACRO PID implementation is wrong, right?

Hamburger:
Checking for "defined SERVO" for exclude yaw constrain is bad idea. The SERVO is defined on any copter with gimbal or CamTrig enabled.
by Mis
Mon Jun 17, 2013 11:56 pm
Forum: Software development
Topic: V2.2 - ACRO PID implementation is wrong, right?
Replies: 282
Views: 107259

Re: V2.2 - ACRO PID implementation is wrong, right?

Did you know if you have Crius AIOP v1, V1.1 or v2 you can have I2C speed commented out. I have it like that and don't have I2C errors anymore. Do you know, that "#define I2C_SPEED" definition have no effect in most cases because "sensors.ino" have own I2C speed definitions for ...
by Mis
Thu Jun 13, 2013 11:48 pm
Forum: Software development
Topic: List of problems in Version2.2
Replies: 58
Views: 7879

Re: List of problems in Version2.2

Yes, this line is ignored, and function return with true one line above.
by Mis
Thu Jun 13, 2013 11:42 pm
Forum: Software development
Topic: atomicServo declared and written but never used for HW PWM?
Replies: 6
Views: 505

Re: atomicServo declared and written but never used for HW P

Hamburger, please extend #if defined(MEGA) && defined(MEGA_HW_PWM_SERVOS) #undef SERVO_1_HIGH // No software PWM's if we use hardware MEGA PWM #endif in "def.h" to #if (defined(MEGA) && defined(MEGA_HW_PWM_SERVOS)) || (defined(PROMICRO) && defined(A32U4_4_HW_PWM_SER...
by Mis
Thu Jun 13, 2013 1:47 pm
Forum: Software development
Topic: atomicServo declared and written but never used for HW PWM?
Replies: 6
Views: 505

Re: atomicServo declared and written but never used for HW P

Yes, you're hight. atomicServo is not used with HW_PWM. But little simplify your condition: /**************************************************************************************/ /*************** Software PWM & Servo variables ********************/ /********************************************...
by Mis
Sat Jun 08, 2013 7:46 pm
Forum: Software development
Topic: RSSI PWM Input - solution needed
Replies: 14
Views: 4440

Re: RSSI PWM Input - solution needed

RC reading is little more complicated, but work with PCINT interrupts in similar way. About help... This is easy with one configuration, like Mega2560 board with standard RC. But we have three different hardware versions (328, 32U4, 2560) and two receiver standards (normal and PPM-SUM) that use PCIN...
by Mis
Fri Jun 07, 2013 11:44 pm
Forum: Software development
Topic: RSSI PWM Input - solution needed
Replies: 14
Views: 4440

Re: RSSI PWM Input - solution needed

If You want measure pulse time without waste time, You must use interrupts like PCINT and micros variable or any other timer value. You must write interrupt handler function, and inside "setup" function you must configure and enable PCINT interrupt. The interrupt handler must detect input ...
by Mis
Wed Jun 05, 2013 10:42 pm
Forum: Software development
Topic: Airplane mode
Replies: 512
Views: 90651

Re: Airplane mode

Enable #define MEGA_HW_PWM_SERVOS in config.h and then servo pins are: 44.45.46.11,12,6,7,8. All these pins are available on AIO board, and additionally you get precision and jitter free servo signals. Pins 44,45,46 are used for gimbal and camera. Pins 11,12,6,7 are for servos, and pin 8 for motor.
by Mis
Sat May 25, 2013 8:34 pm
Forum: Ideas
Topic: Airplane mode RTH
Replies: 824
Views: 131295

Re: Airplane mode RTH

Mine seemed to keep level wings, but did allow me to set it in a climb angle (and leave the sticks).

You must perform ACC calibration with more "nose" down.
by Mis
Fri May 24, 2013 6:38 pm
Forum: Software development
Topic: Problem with Gyro (WMP)
Replies: 6
Views: 632

Re: Problem with Gyro (WMP)

Try run gyro calibration from TX sticks.
by Mis
Mon May 20, 2013 1:19 pm
Forum: Ideas
Topic: wishlist for v2.3
Replies: 104
Views: 18310

Re: wishlist for v2.3

This function would make MultiWii the almost perfect system for me. Turn on the HEADFREE box in multiwii and... Tada, you have "Simple mode". Better, if you have GPS and you enable "advanced headfree" in config.h, then if you fly over 15m from starting point, pulling the pith st...
by Mis
Sat May 18, 2013 3:48 pm
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

Current servos assignment (servos numbers from 1 to 8) All models: Servo1 - Camera Pitch Servo2 - Camera Roll Servo3 - Camera Trigger or Traditional flaps on Airplane On SERVO_MIX_TILT setting, servo1 and servo2 are mixed for gimbal control BI: Servo5 - Left wing Servo6 - Right wing TRI: Servo6 - Re...
by Mis
Sat May 18, 2013 1:03 pm
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

Problems with different hardware solved. From r1445 the servo[0] is always CamPitch, servo[1] is always CamRoll, and tri servo is always servo[5]. On special cases like MEGA_HW_PWM or A0_A1_PIN_HEX, the outpust is moved to desired pins, but for GUI and other config are still the same. To other devel...
by Mis
Fri May 17, 2013 5:02 pm
Forum: Software development
Topic: when/why does 'static' reduce memory footprint?
Replies: 1
Views: 270

Re: when/why does 'static' reduce memory footprint?

Static variables inside any function are allocated in RAM at constant place. In most cases the allocation and value loading is done at bootup time. In this case the program in FLASH can be smaller because we not need load predefined values to RAM at any function entry, BUT the RAM memory is wasted b...
by Mis
Wed May 15, 2013 9:28 pm
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

I think that serial communication is too fast. I must click several times on "Read" button for get BOX'es and enabling servo TAB. And, the servo tab implementation is only partial. You must add an way to setting "servo middle value" for using RC channel as source of middle positi...
by Mis
Tue May 14, 2013 10:08 am
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

*Yawmotor is still broken. In Mixtable. #if YAWMOTOR motor[1] = servo[5]; // use motor2 output for YAWMOTOR #endif motor[1] Must be defined in def or simply remove it in mixtable! It is irrelevant and has no effect. *Flaps is still broken! There is no controll from RC channels! Only centering!.. .....
by Mis
Sat May 11, 2013 6:25 pm
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

Hamburger, if you disable "#define HELI_USE_SERVO_FOR_THROTTLE" the last used servo number is 7, not 8. At this case no output for SERVO8. Motor1 can use this pin.
by Mis
Sat May 11, 2013 1:58 pm
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

Hamburger: All pin definitions are in def.h and output.ino. For promini: Motors : 9,10,11,3,6,5,A2,12 Servos : A0,A1,A2,12,11,3,10,9 As you see S8 collide with M1, but this is not a problem because both is used as the same value output for mainmotor S7 collide with M2, and enabling Motor2 disable se...
by Mis
Sat May 11, 2013 1:08 am
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

Hamburger:
Ok, I'm sorry, I missed this collision on promini board, BUT on Mega2560 boards this should work without problem, especially with hardware PWM's.
I use Mega2560 board for testing...
by Mis
Thu May 09, 2013 11:59 pm
Forum: Software development
Topic: Motor Test
Replies: 2
Views: 1046

Motor Test

Someone want "Motor Test" function in MultiWii ? This function allow to easy test all connected motors by select motor number for test, and set motor speed via slider in GUI. This is similar to "dynamic prop balance", but work always, not only if code is compiled with "#defi...
by Mis
Wed May 08, 2013 12:18 pm
Forum: Software development
Topic: Dev 1431 Throttle/ESC issue?
Replies: 2
Views: 302

Re: Dev 1431 Throttle/ESC issue?

Alexinparis in other topic explain it: "If you plan to use dev after r1391, the setting configuration also changed in GUI, and you must use the last GUI in _shared. (for instance MINCOMMAND config was added) Otherwise, you could encounter such oddity due to parameter misalignment." In conc...
by Mis
Tue May 07, 2013 8:06 pm
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

Hamburger, i'm sorry, accidentally I delete one bracket (before "YAWMOTOR" in "#if defined(HELICOPTER) && (YAWMOTOR)" after testing, but before commiting to _shared Thank's for correct this. Nhadrian: I not good programist in "processing" and additionally I have...
by Mis
Tue May 07, 2013 5:52 pm
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

Yaw servo reversing: set servo5 rate to 1 (0 is no reverse) or use Servo5 first "Reverse" checkbox on my ServoMiscConf program. Throttle servo never use conf.servoConf[7] values. All min,max,middle and rate can be used for other settings. But maybe must for gas engine helis ?? I don't know...
by Mis
Sun May 05, 2013 12:48 am
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

Hamburher, look at "annex_code()". This is super time waste procedure... Lot of calculations of RC signals on every main loop cycle, but RC signal source is only 50Hz period... And calculations of dynamic PID's, Throttle Curve, and Pitch/roll rate is maked on every cycle. This is only hugu...
by Mis
Sat May 04, 2013 10:01 pm
Forum: Software development
Topic: General servo handler - almost done
Replies: 115
Views: 19170

Re: General servo handler - almost done

The check take about quater microsecond and cycle time impact is completely negligible.
This is usable a) for tunning, b) for gimbal control.
by Mis
Sat May 04, 2013 7:39 pm
Forum: Ideas
Topic: rx stick calibration
Replies: 5
Views: 1476

Re: rx stick calibration

This is not standard behaviour. Do it yourself in Your private code. In RX.ino in function "uint16_t readRawRC(uint8_t chan)" add few lines just lines before "return data; // We return..." if(chan == THROTTLE) data += 125; // add 125 to throttle if(chan == ROLL) data -= 25; // su...