Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Make Travis check doxygen #307

Merged
merged 2 commits into from
Mar 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ addons:
- cmake
- check
- lcov
# Required for doxygen check
- doxygen
- texlive
- texlive-pictures
- pgf
# Required for gcc-arm-embedded
- lib32bz2-1.0
- lib32ncurses5
Expand All @@ -30,13 +35,18 @@ install:
- wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q2-update/+download/gcc-arm-none-eabi-4_9-2015q2-20150609-linux.tar.bz2
- tar -xf gcc-arm-none-eabi-4_9-2015q2-20150609-linux.tar.bz2
- export PATH=$PATH:$PWD/gcc-arm-none-eabi-4_9-2015q2/bin
# Install doxygen 1.8
# TODO: Replace with PPA once whitelisted, see https://github.com/travis-ci/apt-source-whitelist/issues/40


script:
# Test libswiftnav
- mkdir build
- cd build/
- cmake -DCMAKE_BUILD_TYPE=Coverage ../
- make
# Check the doxygen
- make check-style
# Install locally to avoid sudo
- make DESTDIR="./install" install
# Test ARM cross-compile
Expand Down
3 changes: 2 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Tools needed:
- doxygen
- convert from ImageMagick
- pip install gcovr diff-cover
- pdflatex from TeX Live
- texlive and texlive-pictures
- pgf (for missing TeX dependency)
- libcheck (otherwise `make` will not run unit tests)

To get started, run::
Expand Down
4 changes: 2 additions & 2 deletions include/libswiftnav/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ do { \
} while (0)

/** Log a debug message indicating entry to a function.
* Logs a debug message of the form `<function_name>` to indicate entry to a
* Logs a debug message of the form `\<function_name\>` to indicate entry to a
* function. `function_name` is automatically filled in with the name of the
* current function by GCC magic.
*/
Expand All @@ -102,7 +102,7 @@ do { \
} while (0)

/** Log a debug message indicating exit to a function.
* Logs a debug message of the form `</function_name>` to indicate exit from a
* Logs a debug message of the form `\</function_name\>` to indicate exit from a
* function. `function_name` is automatically filled in with the name of the
* current function by GCC magic.
*/
Expand Down
20 changes: 10 additions & 10 deletions include/libswiftnav/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,26 @@
#define SID_STR_LEN_MAX 16

/** Constellation identifier. */
enum constellation {
typedef enum constellation {
CONSTELLATION_INVALID = -1,
CONSTELLATION_GPS,
CONSTELLATION_SBAS,
CONSTELLATION_COUNT,
};
} constellation_t;

/** Code identifier. */
enum code {
typedef enum code {
CODE_INVALID = -1,
CODE_GPS_L1CA,
CODE_GPS_L2CM,
CODE_SBAS_L1CA,
CODE_COUNT,
};
} code_t;

/** GNSS signal identifier. */
typedef struct {
u16 sat;
enum code code;
code_t code;
} gnss_signal_t;

/** Signal comparison function. */
Expand All @@ -89,14 +89,14 @@ static inline bool sid_is_equal(const gnss_signal_t a, const gnss_signal_t b)

/* \} */

gnss_signal_t construct_sid(enum code code, u16 sat);
gnss_signal_t construct_sid(code_t code, u16 sat);
int sid_to_string(char *s, int n, gnss_signal_t sid);
bool sid_valid(gnss_signal_t sid);
bool code_valid(enum code code);
bool constellation_valid(enum constellation constellation);
gnss_signal_t sid_from_code_index(enum code code, u16 code_index);
bool code_valid(code_t code);
bool constellation_valid(constellation_t constellation);
gnss_signal_t sid_from_code_index(code_t code, u16 code_index);
u16 sid_to_code_index(gnss_signal_t sid);
enum constellation sid_to_constellation(gnss_signal_t sid);
enum constellation code_to_constellation(enum code code);
enum constellation code_to_constellation(code_t code);

#endif /* LIBSWIFTNAV_SIGNAL_H */
14 changes: 7 additions & 7 deletions src/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/** Element in the code data table. */
typedef struct {
enum constellation constellation;
constellation_t constellation;
u16 sat_count;
u16 sat_start;
const char *str;
Expand Down Expand Up @@ -49,7 +49,7 @@ static const char * unknown_str = "?";
*
* \return gnss_signal_t corresponding to the specified arguments.
*/
gnss_signal_t construct_sid(enum code code, u16 sat)
gnss_signal_t construct_sid(code_t code, u16 sat)
{
gnss_signal_t sid = {.code = code, .sat = sat};
return sid;
Expand Down Expand Up @@ -98,7 +98,7 @@ bool sid_valid(gnss_signal_t sid)
*
* \return true if code is valid, false otherwise
*/
bool code_valid(enum code code)
bool code_valid(code_t code)
{
return ((code >= 0) && (code < CODE_COUNT));
}
Expand All @@ -109,7 +109,7 @@ bool code_valid(enum code code)
*
* \return true if constellation is valid, false otherwise
*/
bool constellation_valid(enum constellation constellation)
bool constellation_valid(constellation_t constellation)
{
return ((constellation >= 0) && (constellation < CONSTELLATION_COUNT));
}
Expand All @@ -122,7 +122,7 @@ bool constellation_valid(enum constellation constellation)
*
* \return gnss_signal_t corresponding to code and code_index.
*/
gnss_signal_t sid_from_code_index(enum code code, u16 code_index)
gnss_signal_t sid_from_code_index(code_t code, u16 code_index)
{
assert(code_valid(code));
assert(code_index < code_table[code].sat_count);
Expand All @@ -147,7 +147,7 @@ u16 sid_to_code_index(gnss_signal_t sid)
*
* \return Constellation to which sid belongs.
*/
enum constellation sid_to_constellation(gnss_signal_t sid)
constellation_t sid_to_constellation(gnss_signal_t sid)
{
return code_to_constellation(sid.code);
}
Expand All @@ -158,7 +158,7 @@ enum constellation sid_to_constellation(gnss_signal_t sid)
*
* \return Constellation to which code belongs.
*/
enum constellation code_to_constellation(enum code code)
constellation_t code_to_constellation(code_t code)
{
assert(code_valid(code));
return code_table[code].constellation;
Expand Down