tried the Modelci code on my Rushduino 1.2 . It doesnt work

Jan
staroman wrote:Hi,
tried the Modelci code on my Rushduino 1.2 . It doesnt work. Made the changes how described. Fly with 2.11 dev 1177 ... Any hints?
Jan
katana wrote:Finally I have found the hardware to record the video.
https://vimeo.com/42752848
In the first part there is the video with the osd, from the minute (1.47) the video bypassing the osd.
To notice also the values of position and baro height...
modelci wrote:Hi,
Do not see even the first screen? Does not seem the Multiwii version number?
All I know, the new version has not changed anything with the use of an ordinary receiver. But, there are changes in the use of SBus, Spektrum and serial_sum_ppm receivers.
Sorry, I'm telling you the theoretical. I have burnt my diy board when I give the wrong voltage. I ordered a Minim-osd clone. I can start re-trials when it comes.
Greetings,
Oktay
Code: Select all
voltage=(analogRead(voltagePin)*1.1*DIVIDERRATIO)/102.3;
Code: Select all
#define DIVIDERRATIO 25 // R1/R2 of voltagePin. Original 14
modelci wrote:Hi,
Do not see even the first screen? Does not seem the Multiwii version number?
All I know, the new version has not changed anything with the use of an ordinary receiver. But, there are changes in the use of SBus, Spektrum and serial_sum_ppm receivers.
Sorry, I'm telling you the theoretical. I have burnt my diy board when I give the wrong voltage. I ordered a Minim-osd clone. I can start re-trials when it comes.
Greetings,
Oktay
kataventos wrote:Working 96% with 2.1MWC
so, at this time I just have two words for you: Great Job![]()
I like the: no throttle, back to main screen without save
carlonb wrote:Hi Oktay,
Great job, I have one question, it's your arduino sketch compatible with MinimOsd hardware ?
If not, what I need to change in your sketch to adapt the control of MAX7456 ?
Thanks, Carlo
jsflyrv wrote:Modelci could you please explain that? the problem with this board all along has been not being able to change PID settings
Code: Select all
void saveExit()
{
waitStick=3;
serialWait=0;
if (configPage==1){
Serial.write('$');
Serial.write('M');
Serial.write('<');
checksum=0;
dataSize=30;
Serial.write((byte)dataSize);
checksum ^= dataSize;
Serial.write(MSP_SET_PID);
checksum ^= MSP_SET_PID;
for(i=0; i<PIDITEMS; i++){
Serial.write(P8[i]);
checksum ^= P8[i];
Serial.write(I8[i]);
checksum ^= I8[i];
Serial.write(D8[i]);
checksum ^= D8[i];
}
Serial.write((byte)checksum);
MSPcmdsend = MSP_EEPROM_WRITE;
blankserialRequest(MSPcmdsend);
}
if (configPage==2){
Serial.write('$');
Serial.write('M');
Serial.write('<');
checksum=0;
dataSize=7;
Serial.write((byte)dataSize);
checksum ^= dataSize;
Serial.write(MSP_SET_RC_TUNING);
checksum ^= MSP_SET_RC_TUNING;
Serial.write(rcRate8);
checksum ^= rcRate8;
Serial.write(rcExpo8);
checksum ^= rcExpo8;
Serial.write(rollPitchRate);
checksum ^= rollPitchRate;
Serial.write(yawRate);
checksum ^= yawRate;
Serial.write(dynThrPID);
checksum ^= dynThrPID;
Serial.write(thrMid8);
checksum ^= thrMid8;
Serial.write(thrExpo8);
checksum ^= thrExpo8;
Serial.write((byte)checksum);
MSPcmdsend = MSP_EEPROM_WRITE;
blankserialRequest(MSPcmdsend);
}
if (configPage==3 || configPage==4){
writeEEPROM();
}
configExit();
}
dramida wrote:Could you do an rushduino software version witch compile on an Atmega 16? (that would be compatible with remzibi hardware and many of us already have one )
modelci wrote:jsflyrv wrote:Modelci could you please explain that? the problem with this board all along has been not being able to change PID settings
1- When you have made the changes (pid or rc-tuning), exit with "SaveExit". These changes will be written to the SRAM on the MW FC.
2- Make experiments with changed values.
3- If everything is OK. Go to the config screen 5/6 Calibration. Push right YAW stick while on the "MW EEPROM Write". Permanently written to the MW FC EEPROM.
This is the property that I have added for me.
If you do not like this feature make the following changes in serial.ino:
modelci wrote:dramida wrote:Could you do an rushduino software version witch compile on an Atmega 16? (that would be compatible with remzibi hardware and many of us already have one )
In the existing features will not fit in 168. Will be a lot of clipped features.
Gave up a lot even to fit 328.
staroman wrote:Has anyone a sw version for the rushduino working with the devs?
Jan
dramida wrote:I want to build this OSD, i need an clear schematic, a list of components and a PCB in 50x50 square, is anywhere i can find that? (i'll build another one to donate here )
kataventos wrote:@Modelci
1- Suddently my Alt is 23556m (when disarmed)!!! can you explain this? I have on serial 3 the FRSKY data sent correct to my 9x, so, the problem have to be on OSD soft?! Any idea?
2- The horizon line is a litle bit lazy! Can we fix that to be more natural with movements?
Code: Select all
void displayHorizon(short rollAngle, short pitchAngle)
{
rollAngle = rollAngle / 10;
pitchAngle = pitchAngle /10;
if(pitchAngle>25) pitchAngle=25;
if(pitchAngle<-20) pitchAngle=-20;
if(rollAngle>40) rollAngle=40;
if(rollAngle<-40) rollAngle=-40;
pitchAngle = pitchAngle /5;
displayHorizonPart(rollAngle,0,pitchAngle );
displayHorizonPart(rollAngle*0.75,1,pitchAngle );
displayHorizonPart(rollAngle*0.5,2,pitchAngle );
displayHorizonPart(rollAngle*0.25,3,pitchAngle );
displayHorizonPart(0,4,pitchAngle );
displayHorizonPart(-1*rollAngle*0.25,5,pitchAngle );
displayHorizonPart(-1*rollAngle*0.5,6,pitchAngle );
displayHorizonPart(-1*rollAngle*0.75,7,pitchAngle );
displayHorizonPart(-1*rollAngle,8,pitchAngle );
#if defined(DISPLAY_HORIZON_BR)
//Draw center scree
screen[219-30]=0x03;
screen[224-30-1]=0x1D;
screen[224-30+1]=0x1D;
//screen[224-30-2]=0x1D;
//screen[224-30+2]=0x1D;
screen[224-30]=0x01;
screen[229-30]=0x02;
#if defined WITHDECORATION
screen[128]=0xC7;
screen[128+30]=0xC7;
screen[128+60]=0xC7;
screen[128+90]=0xC7;
screen[128+120]=0xC7;
screen[128+12]=0xC6;
screen[128+12+30]=0xC6;
screen[128+12+60]=0xC6;
screen[128+12+90]=0xC6;
screen[128+12+120]=0xC6;
#endif
#endif
}
Code: Select all
if ((cmdMSP==MSP_RC) && (dataSize==16))
{
for(i=0;i<8;i++) MwRcData[i] = read16();
}
Code: Select all
if ((cmdMSP==MSP_RC) && (dataSize>=8))
{
for(i=0;i<4;i++) MwRcData[i] = read16();
}
modelci wrote:Hi,
My order seems on the road since October 27. I studied a little on r1240. I have not seen a mismatch outside the radio type selection. I think to solve this is by directly entering datasize, for now.Code: Select all
if ((cmdMSP==MSP_RC) && (dataSize==16))
{
for(i=0;i<8;i++) MwRcData[i] = read16();
}
modelci wrote:Hi,
I ordered my card is still not. I'm trying to darkness.
I'd like to try the new code. I'd appreciate it if the result reported.
http://osd-max7456-multiwii.googlecode.com/files/osd_max7456_multiwii_V1_2.zip
modelci wrote:Thank you Kataventos.
This code for r1240. Still, made no correction for the modes. (Depending on the choice camstab camtrig.) I think an algorithm for it. Soon...
I'm not a C programmer. I'm an old retired man from periods of COBOL, FORTRAN4. So, developments it was a bit slow.
I´m sure we all thank you for your time on this Boss
vpb wrote:Hi all, I also want to build this osd board, awesome thing. Back 2-3 pages, I read
https://sites.google.com/site/modelatol ... d-multiwii
And I build this OSD board with Atmega328P & MAX7456? Are there some more points I have to look at?
Thanks!
Code: Select all
void displayHorizon(short rollAngle, short pitchAngle)
{
if(pitchAngle>200) pitchAngle=200;
if(pitchAngle<-200) pitchAngle=-200;
if(rollAngle>400) rollAngle=400;
if(rollAngle<-400) rollAngle=-400;
for(g=0;g<9;g++){
singleBarVal[g]=((pitchAngle*1.6)+352) + (rollAngle*((g-4)*0.178)); // calc each bar position in the 9 columns (0-640; top down)
if (singleBarVal[g]<0) singleBarVal[g]=0; // Limit
if (singleBarVal[g]>639) singleBarVal[g]=640; // Limit
}
for(g=0;g<9;g++){
d= singleBarVal[g]*-1;
c= singleBarVal[g]/10;
f= (d/80)+3; // calc row
e= (c%8)-4; // calc charvalue
screen[240+(30*f)+10+g]=0x13-e; // "+10" -> start left site; 0x13 "zero"char
}
Code: Select all
if(MwSensorPresent&ACCELEROMETER) displayHorizon(MwAngle[0],MwAngle[1]);
Code: Select all
// For Mode Active 211 dev 1240
#define STABLEMODE 1
#define BOXCAMSTAB 2
#define BAROMODE 4
#define MAGMODE 8
#define ARMEDMODE 16
#define GPSHOMEMODE 64
#define GPSHOLDMODE 32
#define BOXCAMTRIG 128
#define BOXCAMTRIG 256
trailblazer wrote:Hi, I´m new to all the "FPV" stuff, but started a project with a multiwii quad, fatshark TX system and a rushduino as osd hardware.
(WII logo have to die).
I´m not that good in programming so maybe some simplifications can be done to reduce the amount of calculations.
modelci wrote:I corrected the error in the schema that page:
ATmega328P (PDIP) pin17 (Arduino pin11) MOSI to MAX7456 pin9 SDIN.
ATmega328P (PDIP) pin18 (Arduino pin12) MISO to MAX7456 pin11 SDOUT.
ATmega328P (PDIP) pin19 (Arduino pin13) SCK to MAX7456 pin10 SCLK.
ATmega328P (PDIP) pin16 (Arduino pin10) PCINT2 to MAX7456 pin8 CS on RUSHDUINO-OSD.
(ATmega328P (PDIP) pin12 (Arduino pin6) PCINT22 to MAX7456 pin8 CS on Minim-OSD).
I used the SparkFun max7456 breakout board. On that the card:
C9 and C10 are both 47 uF.
R5, R8, R9 and R10 not used.
I hope that helps.
kataventos wrote:Definitively the altitude and meters per second have a problem with negative values and presents crazy numbers... Any ideas?
1-Velocity delivers a crazy number descending on power up synchronized with the time (seconds), then it stops on 0!
2-Motor on/off don´t work
3-ACC on does not check box
4-GPS home is on GPS hold
5-GPS hold says that motors are on
EDIT: Tomorrow I will test Trailblazer mode active