Commit Graph
65 Commits
Author SHA1 Message Date
Lorenz Meier 7faffdc945 Updated driver framework repo 2015-11-10 13:21:13 +01:00
Lorenz Meier 67132b0b16 Register the driver framework correctly 2015-11-10 13:21:13 +01:00
Mark Charlebois de1a7b30ce gyrosim and adcsim now compile with DriverFramework enabled
Only the posix build is tested for compilation

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-10 13:21:13 +01:00
Mark Charlebois 847b604841 Added Gyrosim
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-10 13:21:13 +01:00
Mark Charlebois dc3d805386 Removed unussed function
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-10 13:21:13 +01:00
Mark Charlebois 9074d3dd8e Adding in DriverFramework
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-10 13:21:13 +01:00
Mark Charlebois 7ddd5712c5 Integrated DriverFramework
Refacored ADCSIM
Compilation succeeds. Link not yet fixed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-10 13:21:13 +01:00
jgoppert ca5a2d1fca Fixed some sitl init bugs. 2015-11-07 11:49:06 -05:00
Mark Charlebois 8d59d08ad6 Removed unnecessary header files from accelsim
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-10-29 12:21:52 -07:00
Mark Charlebois a5c002ac2e Removed more accelsim deadcode
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-10-29 12:17:24 -07:00
Mark Charlebois 21ef602b5a More accelsim cleanup
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-10-29 12:12:38 -07:00
Mark Charlebois 474e376f96 Removed deadcode from accelsim
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-10-29 12:04:19 -07:00
Lorenz Meier 0b7f6902a9 POSIX Sim drivers: Fix formatting 2015-10-19 13:35:32 +02:00
Lorenz Meier 08e37f79dc Introduce jMAVSim as submodule 2015-10-17 17:33:27 +02:00
Daniel Agar 6c10cf18e4 re-enable Werror 2015-10-06 18:28:30 -04:00
James Goppert 2908a377cf Found stc macro def issue for sitl build on travis. 2015-09-24 16:43:57 -04:00
James Goppert b6d8fe3f01 Another fix for travis sitl build. 2015-09-24 16:27:09 -04:00
James Goppert e38eba0934 cmake: Fix for posix sitl. 2015-09-20 11:17:31 -04:00
Lorenz Meier b2a8dd18c0 Gyrosim: More verbose output 2015-09-20 16:43:44 +02:00
Lorenz Meier 59f71452d7 Sensor sim: Initialize sensor data to zero 2015-09-20 12:55:48 +02:00
Lorenz Meier ddd1b82240 Simulated sensors: Publish valid data initially 2015-09-20 11:36:11 +02:00
Lorenz Meier ceb7204590 POSIX sim: Remove unused error variables 2015-09-12 10:52:44 +02:00
Mark Charlebois 7e1c984234 Hack to get posix build partially working
Created a dummy build_git_version.h so I did not have to figure out
how to generate it.

Commented out topic_listener.cpp from src/systemcmds/CMakeLists.txt
because it depends on a generated cpp file.

Link doesn't work mut many modules build

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-09-08 15:39:13 -07:00
James Goppert 1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
tumbili 9f90b87745 implemented driver for simulated airspeed 2015-09-04 22:34:28 +02:00
Mark Charlebois a589d15c52 Refactored debug() and log() in CDev
These functions used vprintf which is not available on all platforms.
They also do not enable line and file debug output.

Changed to macros that preserve the output format.  Uses new macro that
can be used to implement per object, runtime selectable logging

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-08-11 12:07:06 -07:00
Lorenz Meier df4b07937e baro sim: Fix code style 2015-07-09 00:01:20 +02:00
Lorenz Meier fc9d6ac39b POSIX baro SITL: Failed advert type is pointer, not number 2015-07-05 16:16:57 +02:00
Mark Charlebois 1b01c54dd1 POSIX: fixed build error for unused variable
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-30 09:53:01 -07:00
Mark Charlebois 34d15fe631 Gyrosim cleanup
Removed unused code. Reset reschedule interval for sampling when the
sampling rate is changed.

The rate is always 1000Hz as it is set to the default value.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-30 09:23:37 -07:00
tumbili b1991b3813 scale epv and eph correctly 2015-06-25 23:48:38 +02:00
tumbili 24ac4c9891 remove usleep in gyrosim 2015-06-24 09:19:59 +02:00
Mark Charlebois 7734195242 gpssim: cleaned up gpssim code
The gpssim code was named gps_sim vs being consistent with other
simulators (gpssim). It also used warnx and errx and had lots of
commeted out code.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-18 09:02:30 +02:00
Mark Charlebois ed58e83460 gyrosim: removed dead code from gyrosim
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-15 18:08:22 -07:00
Mark Charlebois 729653ba71 SITL: changed posix_default to posix_sitl
The SITL build is now the default posix build.

The linker script for posix was moved to makefiles/posix.
The rc.S file was moved to posix-configs/SITL/init/
The POSIXTEST board definition is now SITL

To run the SITL test run:

make sitlrun

This replaces the make posixrun target.

The build directory is now Build/posix_sitl.build/

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-15 09:51:07 -07:00
Mark Charlebois 527b97e8b4 POSIX: added tone_alarm simulator
The tone_alarm simulator was added to rc.S and the warning output for a
hrt_timer with a 0 expiry times was disabled.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 19:00:49 -07:00
Mark Charlebois 83bcb95999 POSIX: Added sleep command
The baro was not fully initialized when the sensors module tried to
open it. Added a sleep command and a sleep 2 to rc.S so the baro
is initialized by the time the sensors module tried to read it.

Fixed other noisy errors

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 17:28:46 -07:00
tumbili 5694e37854 fix reading baro values from simulator 2015-06-08 22:21:59 -07:00
tumbili 9a4bee834d added gpssim driver 2015-06-08 22:21:58 -07:00
tumbili aef3f37ae0 enable reading sensor data from simulator module for SITL 2015-06-08 22:21:58 -07:00
Mark Charlebois f763c4cc0e POSIX: fixed type used in USEC2TICKS
The macro was using a constant defined as a long instead on an
unsigned long. Made corresponsing changes to barosim.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-03 11:49:28 -07:00
Mark Charlebois 122c52c731 POSIX: Fixes for ARMv7 build
uint64_t needs to use PRIu64 in printf.
Clang-3.5 found an error is variable types for a compare.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-02 16:55:39 +00:00
Mark Charlebois 5e95b83eff POSIX: Fixes for HRT implementation of simulated HW clock polling
There is a race condition for the accel and mag polling rates.
Whichever one gets set first, the other will be uninitialized.

Set the mag polling rate to 1ms if uninitilized.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-02 16:55:34 +00:00
Mark Charlebois cced8ed69e POSIX: added hrt_queue for handling fast periodic events
The workqueues measure time in ticks  which is typically 10ms.
Some interrupt events in Nuttx occur at about 1ms so a more
granular workqueue is needed for POSIX.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-02 16:55:33 +00:00
Mark Charlebois 2d85578599 Gyrosim: Fixed constant looping
Gyrosim would call measure continuously because the write_checked_reg
was failing. There is no need to check faked reg writes in the
simulator so that code was removed.

The delay that was added to the simulator to pace the gyrosim reads
was also removed now that the source of the problem was determined.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-28 11:20:30 -07:00
Lorenz Meier be3551136a Airspeed sim: Use proper constant names 2015-05-27 21:16:59 +02:00
Mark Charlebois 1ca05aaa64 orb_advert_t changed to void * and checks changed to nullptr
The existing orb_advert_t use thoughout the code sometimes tries
to treat it as a file descriptor and there are checks for < 0
and ::close calls on orb_advert_t types which is an invalid use
of an object pointer, which is what orb_advert_t really is.

Initially I had changed the -1 initializations to 0 but it was
suggested that this should be nullptr. That was a good recommendation
but the definition of orb_advert_t had to change to void * because
you cannot initialize a uintptr_t as nullptr.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Mark Charlebois 180c8b0cb0 Missed another < 0 check
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:41:33 -07:00
Mark Charlebois a734fc96d1 extensive orb_advert_t fixes
The calls to orb_advertise were being mishandled throughout the code.
There were ::close() calls on memory pointers, there were checks
against < 0 when it is a pointer to a object and values larger than
0x7ffffffff are valid. Some places orb_advert_t variables were
being initialized as 0 other places as -1.

The orb_advert_t type was changed to uintptr_t so the pointer value
would not be wrapped as a negative number. This was causing a failure
on ARM.

Tests for < 0 were changed to == 0 since a null pointer is the valid
representation for error, or uninitialized.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:41:33 -07:00
Lorenz Meier ee39d72747 Gyro sim: Add ringbuffer namespace 2015-05-25 10:00:52 +02:00