mirror of
https://agent.ghink.cloud/wb2osz/direwolf
synced 2025-04-08 12:28:32 +00:00
modified: .gitattributes modified: APRStt-Implementation-Notes.pdf modified: CHANGES.txt modified: Makefile.linux modified: Makefile.win new file: Raspberry-Pi-APRS-Tracker.pdf modified: Raspberry-Pi-APRS.pdf modified: User-Guide.pdf modified: aclients.c modified: aprs_tt.c modified: aprs_tt.h modified: atest.c modified: audio.c modified: audio.h modified: audio_win.c modified: ax25_pad.c modified: ax25_pad.h modified: beacon.c modified: beacon.h modified: config.c modified: config.h modified: decode_aprs.c modified: decode_aprs.h modified: demod_afsk.c modified: digipeater.c modified: digipeater.h modified: direwolf.c modified: direwolf.conf modified: direwolf.h modified: dsp.c modified: dwgps.c modified: encode_aprs.c modified: encode_aprs.h modified: fsk_demod_state.h new file: grm_sym.h modified: hdlc_rec.c modified: hdlc_rec2.c modified: hdlc_rec2.h modified: kiss.c modified: kiss_frame.c modified: kiss_frame.h modified: kissnet.c modified: latlong.c modified: latlong.h new file: log.c new file: log.h new file: log2gpx.c new file: mgn_icon.h modified: misc/README-dire-wolf.txt modified: multi_modem.c new file: nmea.c new file: nmea.h modified: ptt.c modified: rdq.c modified: regex/README-dire-wolf.txt new file: rpack.h modified: rrbb.c modified: rrbb.h modified: server.c modified: symbols-new.txt modified: symbols.c modified: symbolsX.txt new file: telemetry.c new file: telemetry.h modified: textcolor.c modified: tocalls.txt modified: utm/README.txt modified: version.h modified: xmit.c modified: xmit.h
57 lines
1.4 KiB
C
57 lines
1.4 KiB
C
|
|
#ifndef DIREWOLF_H
|
|
#define DIREWOLF_H 1
|
|
|
|
|
|
/*
|
|
* Maximum number of radio channels.
|
|
*/
|
|
|
|
#define MAX_CHANS 2
|
|
|
|
/*
|
|
* Maximum number of modems per channel.
|
|
* I called them "subchannels" (in the code) because
|
|
* it is short and unambiguous.
|
|
* Nothing magic about the number. Could be larger
|
|
* but CPU demands might be overwhelming.
|
|
*/
|
|
|
|
#define MAX_SUBCHANS 9
|
|
|
|
|
|
#if __WIN32__
|
|
#include <windows.h>
|
|
#define SLEEP_SEC(n) Sleep((n)*1000)
|
|
#define SLEEP_MS(n) Sleep(n)
|
|
#else
|
|
#define SLEEP_SEC(n) sleep(n)
|
|
#define SLEEP_MS(n) usleep((n)*1000)
|
|
#endif
|
|
|
|
|
|
#if __WIN32__
|
|
#define PTW32_STATIC_LIB
|
|
#include "pthreads/pthread.h"
|
|
#else
|
|
#include <pthread.h>
|
|
#endif
|
|
|
|
|
|
/* Not sure where to put these. */
|
|
|
|
/* Prefix with DW_ because /usr/include/gps.h uses a couple of these names. */
|
|
|
|
|
|
#define DW_METERS_TO_FEET(x) ((x) == G_UNKNOWN ? G_UNKNOWN : (x) * 3.2808399)
|
|
#define DW_FEET_TO_METERS(x) ((x) == G_UNKNOWN ? G_UNKNOWN : (x) * 0.3048)
|
|
#define DW_KM_TO_MILES(x) ((x) == G_UNKNOWN ? G_UNKNOWN : (x) * 0.621371192)
|
|
|
|
#define DW_KNOTS_TO_MPH(x) ((x) == G_UNKNOWN ? G_UNKNOWN : (x) * 1.15077945)
|
|
#define DW_KNOTS_TO_METERS_PER_SEC(x) ((x) == G_UNKNOWN ? G_UNKNOWN : (x) * 0.51444444444)
|
|
#define DW_MPH_TO_KNOTS(x) ((x) == G_UNKNOWN ? G_UNKNOWN : (x) * 0.868976)
|
|
#define DW_MPH_TO_METERS_PER_SEC(x) ((x) == G_UNKNOWN ? G_UNKNOWN : (x) * 0.44704)
|
|
|
|
#define DW_MBAR_TO_INHG(x) ((x) == G_UNKNOWN ? G_UNKNOWN : (x) * 0.0295333727)
|
|
|
|
#endif /* ifndef DIREWOLF_H */ |