Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
c26fae0b
Commit
c26fae0b
authored
Jan 07, 2011
by
Alejandro
Browse files
HILSIM ready to test
parent
9ec89231
Changes
2
Show whitespace changes
Inline
Side-by-side
src/ui/SlugsHilSim.cc
View file @
c26fae0b
...
...
@@ -135,7 +135,7 @@ void SlugsHilSim::readDatagram(void){
sendMessageToSlugs
();
commandToSimulink
();
command
Datagram
ToSimulink
();
}
ui
->
ed_count
->
setText
(
QString
::
number
(
count
++
));
...
...
@@ -311,26 +311,28 @@ void SlugsHilSim::sendMessageToSlugs()
}
void
SlugsHilSim
::
commandToSimulink
()
void
SlugsHilSim
::
command
Datagram
ToSimulink
()
{
//mavlink_pwm_commands_t* pwdC = (static_cast<SlugsMAV*>(activeUas))->getPwmCommands();
uint16_t
j
=
10
;
//mavlink_pwm_commands_t* pwdC;
//pwdC->dt_c = 1;
QByteArray
data
;
data
.
resize
(
22
);
unsigned
char
i
=
0
;
setUInt16ToDatagram
(
data
,
&
i
,
1
);
//pwdC->dt_c);
setUInt16ToDatagram
(
data
,
&
i
,
2
);
//pwdC->dla_c);
setUInt16ToDatagram
(
data
,
&
i
,
3
);
//pwdC->dra_c);
setUInt16ToDatagram
(
data
,
&
i
,
4
);
//pwdC->dr_c);
setUInt16ToDatagram
(
data
,
&
i
,
5
);
//pwdC->dle_c);
setUInt16ToDatagram
(
data
,
&
i
,
6
);
//pwdC->dre_c);
setUInt16ToDatagram
(
data
,
&
i
,
7
);
//pwdC->dlf_c);
setUInt16ToDatagram
(
data
,
&
i
,
8
);
//pwdC->drf_c);
setUInt16ToDatagram
(
data
,
&
i
,
9
);
//pwdC->aux1);
setUInt16ToDatagram
(
data
,
&
i
,
10
);
//pwdC->aux2);
setUInt16ToDatagram
(
data
,
&
i
,
11
);
setUInt16ToDatagram
(
data
,
&
i
,
rand
()
);
//pwdC->dt_c);
setUInt16ToDatagram
(
data
,
&
i
,
rand
()
);
//pwdC->dla_c);
setUInt16ToDatagram
(
data
,
&
i
,
rand
()
);
//pwdC->dra_c);
setUInt16ToDatagram
(
data
,
&
i
,
rand
()
);
//pwdC->dr_c);
setUInt16ToDatagram
(
data
,
&
i
,
rand
()
);
//pwdC->dle_c);
setUInt16ToDatagram
(
data
,
&
i
,
rand
()
);
//pwdC->dre_c);
setUInt16ToDatagram
(
data
,
&
i
,
rand
()
);
//pwdC->dlf_c);
setUInt16ToDatagram
(
data
,
&
i
,
rand
()
);
//pwdC->drf_c);
setUInt16ToDatagram
(
data
,
&
i
,
rand
()
);
//pwdC->aux1);
setUInt16ToDatagram
(
data
,
&
i
,
rand
()
);
//pwdC->aux2);
setUInt16ToDatagram
(
data
,
&
i
,
rand
());
//value default
txSocket
->
writeDatagram
(
data
,
QHostAddress
::
Broadcast
,
ui
->
ed_txPort
->
text
().
toInt
());
}
...
...
src/ui/SlugsHilSim.h
View file @
c26fae0b
...
...
@@ -141,7 +141,7 @@ private:
void
sendMessageToSlugs
();
void
commandToSimulink
();
void
command
Datagram
ToSimulink
();
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment