diff --git a/tracker/software/config.c b/tracker/software/config.c index 62a1c50..57e256f 100644 --- a/tracker/software/config.c +++ b/tracker/software/config.c @@ -3,7 +3,7 @@ #include "debug.h" module_conf_t config[9]; -uint8_t ssdv_buffer[65535] __attribute__((aligned(32))); +uint8_t ssdv_buffer[256*1024] __attribute__((aligned(32))); /* * Position module configuration description @@ -50,7 +50,7 @@ uint8_t ssdv_buffer[65535] __attribute__((aligned(32))); * - TRIG_NEW_POINT Triggered when new track point available * - TRIG_TIMEOUT Triggered by timeout (e.g. trasmit position every 120sec) * this option requires trigger.timeout to be set - * - TRIG_CONTINOUSLY Continue continously (e.g. send new image once old image sent completely) + * - TRIG_CONTINUOUSLY Continue continuously (e.g. send new image once old image sent completely) * * ============================== The following options are needed if protocol == PROT_APRS_AFSK or protocol == PROT_APRS_2GFSK =============================== * @@ -173,12 +173,12 @@ void start_user_modules(void) // Module POSITION, APRS 2m AFSK config[0].power = 127; // Power 20 dBm config[0].protocol = PROT_APRS_AFSK; // Protocol APRS, modulation AFSK - config[0].frequency.type = FREQ_STATIC; // Dynamic frequency allocation - config[0].frequency.hz = 144390000; // Default frequency 144.800 MHz + config[0].frequency.type = FREQ_APRS_REGION; // Dynamic frequency allocation + config[0].frequency.hz = 144800000; // Default frequency 144.800 MHz config[0].init_delay = 0; // Module startup delay in msec config[0].trigger.type = TRIG_NEW_POINT; // Trigger when new track point released chsnprintf(config[0].aprs_conf.callsign, 7, "DL7AD"); // APRS Callsign - config[0].aprs_conf.ssid = 11; // APRS SSID + config[0].aprs_conf.ssid = 12; // APRS SSID config[0].aprs_conf.symbol = SYM_BALLOON; // APRS Symbol chsnprintf(config[0].aprs_conf.path, 16, "WIDE1-1"); // APRS Path config[0].aprs_conf.preamble = 300; // APRS Preamble @@ -190,7 +190,7 @@ void start_user_modules(void) config[0].aprs_conf.tel_enc = TRUE; // Transmit Telemetry encoding information activated config[0].aprs_conf.tel_enc_cycle = 3600; // Transmit Telemetry encoding information every 3600sec chsnprintf(config[0].aprs_conf.tel_comment, 30, "http://ssdv.habhub.org/DL7AD");// Telemetry comment - //start_position_thread(&config[0]); + start_position_thread(&config[0]); // Module POSITION, APRS 2m 2GFSK /*config[1].power = 127; // Power 10 dBm @@ -234,23 +234,23 @@ void start_user_modules(void) // Module IMAGE, APRS 2m AFSK low-duty cycle config[3].power = 127; // Power 20 dBm config[3].protocol = PROT_APRS_AFSK; // Protocol APRS SSDV, modulation AFSK - config[3].frequency.type = FREQ_STATIC; // Dynamic frequency allocation - config[3].frequency.hz = 144390000; // Transmission frequency 144.800 MHz + config[3].frequency.type = FREQ_APRS_REGION; // Dynamic frequency allocation + config[3].frequency.hz = 144800000; // Transmission frequency 144.800 MHz config[3].init_delay = 0; // Module startup delay in msec - //config[3].packet_spacing = 30000; // Packet spacing in ms + config[3].packet_spacing = 30000; // Packet spacing in ms //config[3].sleep_conf.type = SLEEP_WHEN_ISOL_BELOW_THRES; //config[3].sleep_conf.isol_thres = 3; - config[3].trigger.type = TRIG_TIMEOUT; // Trigger transmission on timeout (Periodic cycling) + config[3].trigger.type = TRIG_CONTINUOUSLY; // Continuous Trigger config[3].trigger.timeout = 10; // Timeout 10 sec chsnprintf(config[3].aprs_conf.callsign, 7, "DL7AD"); // APRS Callsign - config[3].aprs_conf.ssid = 11; // APRS SSID + config[3].aprs_conf.ssid = 12; // APRS SSID config[3].aprs_conf.preamble = 300; // APRS Preamble chsnprintf(config[3].ssdv_conf.callsign, 7, "DL7AD"); // SSDV Callsign config[3].ssdv_conf.ram_buffer = ssdv_buffer; // Camera buffer config[3].ssdv_conf.ram_size = sizeof(ssdv_buffer); // Buffer size config[3].ssdv_conf.res = RES_QVGA; // Resolution VGA config[3].ssdv_conf.redundantTx = true; // Transmit packets twice - //start_image_thread(&config[3]); + start_image_thread(&config[3]); // Module POSITION, Morse 2m OOK /*config[4].power = 127; // Power 10 dBm @@ -266,15 +266,15 @@ void start_user_modules(void) start_position_thread(&config[4]);*/ // Module IMAGE, APRS 2m 2GFSK - config[5].power = 127; // Power 20 dBm + config[5].power = 50; // Power 20 dBm config[5].protocol = PROT_APRS_2GFSK; // Protocol APRS SSDV, modulation 2GFSK config[5].gfsk_conf.speed = 9600; // 2GFSK Speed config[5].frequency.type = FREQ_STATIC; // Static frequency allocation config[5].frequency.hz = 144860000; // Transmission frequency 144.860 MHz //config[5].init_delay = 60000; // Module startup delay in msec - config[5].sleep_conf.type = SLEEP_WHEN_VBAT_BELOW_THRES; - config[5].sleep_conf.vbat_thres = 4000; - config[5].trigger.type = TRIG_TIMEOUT; // Trigger transmission on timeout (Periodic cycling) + //config[5].sleep_conf.type = SLEEP_WHEN_VBAT_BELOW_THRES; + //config[5].sleep_conf.vbat_thres = 4000; + config[5].trigger.type = TRIG_CONTINUOUSLY; // Trigger transmission on timeout (Periodic cycling) config[5].trigger.timeout = 30; // Timeout 10 sec chsnprintf(config[5].aprs_conf.callsign, 6, "DL7AD"); // APRS Callsign config[5].aprs_conf.ssid = 12; // APRS SSID @@ -284,7 +284,7 @@ void start_user_modules(void) config[5].ssdv_conf.ram_size = sizeof(ssdv_buffer); // Buffer size config[5].ssdv_conf.res = RES_VGA; // Resolution XGA //config[5].ssdv_conf.redundantTx = true; // Transmit packets twice - start_image_thread(&config[5]); + //start_image_thread(&config[5]); // Module IMAGE, SSDV 2m 2FSK /*config[6].power = 127; // Power 20 dBm diff --git a/tracker/software/config.h b/tracker/software/config.h index 327972c..75a3b31 100644 --- a/tracker/software/config.h +++ b/tracker/software/config.h @@ -15,13 +15,13 @@ #define LOG_FLASH_ADDR2 0x080E0000 /* Log flash memory address 2 */ #define LOG_SECTOR_SIZE 0x20000 /* Log flash memory size */ -#define GPS_ON_VBAT 0 /* Battery voltage threshold at which GPS is switched on */ -#define GPS_OFF_VBAT 0 /* Battery voltage threshold at which GPS is switched off */ +#define GPS_ON_VBAT 4000 /* Battery voltage threshold at which GPS is switched on */ +#define GPS_OFF_VBAT 3500 /* Battery voltage threshold at which GPS is switched off */ #define TRACE_TIME TRUE /* Enables time tracing on debugging port */ #define TRACE_FILE TRUE /* Enables file and line tracing on debugging port */ -#define RUN_3V TRUE /* Lets the tracker run a 3V otherwise 1.8V. 3V is needed to do 20dBm radio output power. +#define RUN_3V FALSE /* Lets the tracker run a 3V otherwise 1.8V. 3V is needed to do 20dBm radio output power. * With 1.8V only 15dBm can be done. Some serial-USB adapters also need a 3V IO level in * order to work. However 3V takes a lot of power in idle. You can save energy using 1.8V. */ diff --git a/tracker/software/drivers/ov5640.c b/tracker/software/drivers/ov5640.c index cc292ef..dfec8a1 100644 --- a/tracker/software/drivers/ov5640.c +++ b/tracker/software/drivers/ov5640.c @@ -70,7 +70,7 @@ static const struct regval_list OV5640YUV_Sensor_Dvp_Init[] = { 0x3c0a, 0x9c }, { 0x3c0b, 0x40 }, - { 0x3820, 0x41 }, + { 0x3820, 0x46 }, { 0x3821, 0x01 }, //07 //windows setup @@ -96,7 +96,7 @@ static const struct regval_list OV5640YUV_Sensor_Dvp_Init[] = { 0x3034, 0x1a }, { 0x3035, 0x11 }, //15fps { 0x3036, 0x46 }, - { 0x3037, 0x13 }, + { 0x3037, 0x14 }, { 0x3038, 0x00 }, { 0x3039, 0x00 }, @@ -331,7 +331,7 @@ static const struct regval_list ov5640_vga_preview[] = { 0x3035, 0x11 }, // PLL { 0x3036, 0x46 }, // PLL { 0x3c07, 0x08 }, // light meter 1 threshold [7:0] - { 0x3820, 0x41 }, // Sensor flip off, ISP flip on + { 0x3820, 0x46 }, // Sensor flip off, ISP flip on { 0x3821, 0x01 }, // Sensor mirror on, ISP mirror on, H binning on { 0x3814, 0x31 }, // X INC { 0x3815, 0x31 }, // Y INC @@ -397,8 +397,8 @@ static const struct regval_list OV5640_RGB_QVGA[] = //2592x1944 QSXGA static const struct regval_list OV5640_JPEG_QSXGA[] = { - {0x3820 ,0x41}, - {0x3821 ,0x26}, + {0x3820 ,0x46}, + {0x3821 ,0x20}, {0x3814 ,0x11}, {0x3815 ,0x11}, {0x3803 ,0x00}, diff --git a/tracker/software/mcuconf.h b/tracker/software/mcuconf.h index 885ed41..63e57e5 100644 --- a/tracker/software/mcuconf.h +++ b/tracker/software/mcuconf.h @@ -48,9 +48,9 @@ #define STM32_PLLN_VALUE 192 #define STM32_PLLP_VALUE 4 #define STM32_PLLQ_VALUE 4 -#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_HPRE STM32_HPRE_DIV2 #define STM32_PPRE1 STM32_PPRE1_DIV2 -#define STM32_PPRE2 STM32_PPRE2_DIV1 +#define STM32_PPRE2 STM32_PPRE2_DIV4 #define STM32_RTCSEL STM32_RTCSEL_LSI #define STM32_RTCPRE_VALUE 8 #define STM32_MCO1SEL STM32_MCO1SEL_HSE diff --git a/tracker/software/sleep.c b/tracker/software/sleep.c index 6c3c370..87eb410 100644 --- a/tracker/software/sleep.c +++ b/tracker/software/sleep.c @@ -48,7 +48,7 @@ systime_t waitForTrigger(systime_t prev, trigger_conf_t *config) case TRIG_TIMEOUT: // Wait for specified timeout return chThdSleepUntilWindowed(prev, prev + S2ST(config->timeout)); - case TRIG_CONTINOUSLY: // Immediate trigger + case TRIG_CONTINUOUSLY: // Immediate trigger return chVTGetSystemTimeX(); case TRIG_ONCE: // No trigger defined diff --git a/tracker/software/types.h b/tracker/software/types.h index 6781693..521e35b 100644 --- a/tracker/software/types.h +++ b/tracker/software/types.h @@ -131,7 +131,7 @@ typedef enum { TRIG_ONCE, // Trigger once and never again (e.g. transmit specific position packet only at startup) TRIG_NEW_POINT, // Triggered when new track point available TRIG_TIMEOUT, // Triggered by timeout (e.g. trasmit position every 120sec) - TRIG_CONTINOUSLY // Continue continously (e.g. send new image once old image sent completely) + TRIG_CONTINUOUSLY // Continue continuously (e.g. send new image once old image sent completely) } trigger_type_t; typedef struct {