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

Commit ec96142

Browse files
committed
Merge pull request #307 from ljbade/travis-doxygen
Make Travis check doxygen
2 parents 54c6c61 + 8953dc9 commit ec96142

File tree

5 files changed

+31
-20
lines changed

5 files changed

+31
-20
lines changed

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ addons:
1515
- cmake
1616
- check
1717
- lcov
18+
# Required for doxygen check
19+
- doxygen
20+
- texlive
21+
- texlive-pictures
22+
- pgf
1823
# Required for gcc-arm-embedded
1924
- lib32bz2-1.0
2025
- lib32ncurses5
@@ -30,13 +35,18 @@ install:
3035
- 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
3136
- tar -xf gcc-arm-none-eabi-4_9-2015q2-20150609-linux.tar.bz2
3237
- export PATH=$PATH:$PWD/gcc-arm-none-eabi-4_9-2015q2/bin
38+
# Install doxygen 1.8
39+
# TODO: Replace with PPA once whitelisted, see https://github.com/travis-ci/apt-source-whitelist/issues/40
40+
3341

3442
script:
3543
# Test libswiftnav
3644
- mkdir build
3745
- cd build/
3846
- cmake -DCMAKE_BUILD_TYPE=Coverage ../
3947
- make
48+
# Check the doxygen
49+
- make check-style
4050
# Install locally to avoid sudo
4151
- make DESTDIR="./install" install
4252
# Test ARM cross-compile

DEVELOPMENT.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Tools needed:
77
- doxygen
88
- convert from ImageMagick
99
- pip install gcovr diff-cover
10-
- pdflatex from TeX Live
10+
- texlive and texlive-pictures
11+
- pgf (for missing TeX dependency)
1112
- libcheck (otherwise `make` will not run unit tests)
1213

1314
To get started, run::

include/libswiftnav/logging.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ do { \
9090
} while (0)
9191

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

104104
/** Log a debug message indicating exit to a function.
105-
* Logs a debug message of the form `</function_name>` to indicate exit from a
105+
* Logs a debug message of the form `\</function_name\>` to indicate exit from a
106106
* function. `function_name` is automatically filled in with the name of the
107107
* current function by GCC magic.
108108
*/

include/libswiftnav/signal.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,26 @@
4444
#define SID_STR_LEN_MAX 16
4545

4646
/** Constellation identifier. */
47-
enum constellation {
47+
typedef enum constellation {
4848
CONSTELLATION_INVALID = -1,
4949
CONSTELLATION_GPS,
5050
CONSTELLATION_SBAS,
5151
CONSTELLATION_COUNT,
52-
};
52+
} constellation_t;
5353

5454
/** Code identifier. */
55-
enum code {
55+
typedef enum code {
5656
CODE_INVALID = -1,
5757
CODE_GPS_L1CA,
5858
CODE_GPS_L2CM,
5959
CODE_SBAS_L1CA,
6060
CODE_COUNT,
61-
};
61+
} code_t;
6262

6363
/** GNSS signal identifier. */
6464
typedef struct {
6565
u16 sat;
66-
enum code code;
66+
code_t code;
6767
} gnss_signal_t;
6868

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

9090
/* \} */
9191

92-
gnss_signal_t construct_sid(enum code code, u16 sat);
92+
gnss_signal_t construct_sid(code_t code, u16 sat);
9393
int sid_to_string(char *s, int n, gnss_signal_t sid);
9494
bool sid_valid(gnss_signal_t sid);
95-
bool code_valid(enum code code);
96-
bool constellation_valid(enum constellation constellation);
97-
gnss_signal_t sid_from_code_index(enum code code, u16 code_index);
95+
bool code_valid(code_t code);
96+
bool constellation_valid(constellation_t constellation);
97+
gnss_signal_t sid_from_code_index(code_t code, u16 code_index);
9898
u16 sid_to_code_index(gnss_signal_t sid);
9999
enum constellation sid_to_constellation(gnss_signal_t sid);
100-
enum constellation code_to_constellation(enum code code);
100+
enum constellation code_to_constellation(code_t code);
101101

102102
#endif /* LIBSWIFTNAV_SIGNAL_H */

src/signal.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
/** Element in the code data table. */
2323
typedef struct {
24-
enum constellation constellation;
24+
constellation_t constellation;
2525
u16 sat_count;
2626
u16 sat_start;
2727
const char *str;
@@ -49,7 +49,7 @@ static const char * unknown_str = "?";
4949
*
5050
* \return gnss_signal_t corresponding to the specified arguments.
5151
*/
52-
gnss_signal_t construct_sid(enum code code, u16 sat)
52+
gnss_signal_t construct_sid(code_t code, u16 sat)
5353
{
5454
gnss_signal_t sid = {.code = code, .sat = sat};
5555
return sid;
@@ -98,7 +98,7 @@ bool sid_valid(gnss_signal_t sid)
9898
*
9999
* \return true if code is valid, false otherwise
100100
*/
101-
bool code_valid(enum code code)
101+
bool code_valid(code_t code)
102102
{
103103
return ((code >= 0) && (code < CODE_COUNT));
104104
}
@@ -109,7 +109,7 @@ bool code_valid(enum code code)
109109
*
110110
* \return true if constellation is valid, false otherwise
111111
*/
112-
bool constellation_valid(enum constellation constellation)
112+
bool constellation_valid(constellation_t constellation)
113113
{
114114
return ((constellation >= 0) && (constellation < CONSTELLATION_COUNT));
115115
}
@@ -122,7 +122,7 @@ bool constellation_valid(enum constellation constellation)
122122
*
123123
* \return gnss_signal_t corresponding to code and code_index.
124124
*/
125-
gnss_signal_t sid_from_code_index(enum code code, u16 code_index)
125+
gnss_signal_t sid_from_code_index(code_t code, u16 code_index)
126126
{
127127
assert(code_valid(code));
128128
assert(code_index < code_table[code].sat_count);
@@ -147,7 +147,7 @@ u16 sid_to_code_index(gnss_signal_t sid)
147147
*
148148
* \return Constellation to which sid belongs.
149149
*/
150-
enum constellation sid_to_constellation(gnss_signal_t sid)
150+
constellation_t sid_to_constellation(gnss_signal_t sid)
151151
{
152152
return code_to_constellation(sid.code);
153153
}
@@ -158,7 +158,7 @@ enum constellation sid_to_constellation(gnss_signal_t sid)
158158
*
159159
* \return Constellation to which code belongs.
160160
*/
161-
enum constellation code_to_constellation(enum code code)
161+
constellation_t code_to_constellation(code_t code)
162162
{
163163
assert(code_valid(code));
164164
return code_table[code].constellation;

0 commit comments

Comments
 (0)