uint8_t attributes;
} m_waas_t;
+/* 0x39 - configure position pinning */
+#define M_PINNING 0x39
+typedef struct {
+ uint8_t enable; /* 0 = default, 1 = enable, 2 = disable */
+ uint8_t attributes; /* 0 = ram, 1 = ram+flash */
+} m_pinning_t;
+
+/* 0x3B - configure position pinning */
+#define M_PINNING_PARAMS 0x3B
+typedef struct {
+ uint16_t pin_speed;
+ uint16_t pin_cnt;
+ uint16_t unpin_speed;
+ uint16_t unpin_cnt;
+ uint16_t unpin_dist;
+ uint8_t attributes; /* 0 = ram, 1 = ram+flash */
+} m_pinning_params_t;
+
/* 0x3C - nav mode */
#define M_NAVMODE 0x3c
typedef struct {
return;
}
+/* Configure position pinning – Enable or disable position pinning of GNSS
+ * receiver */
+void venus634_pinning(void)
+{
+ m_pinning_t pinning;
+
+ memset(&pinning, 0, sizeof(m_pinning_t));
+ pinning.enable = 2;
+ pinning.attributes = 0; /* ram */
+
+ venus634_send(M_PINNING, &pinning, sizeof(m_pinning_t));
+}
+
+/* Configure position pinning parameters */
+void venus634_pinning_params(void)
+{
+ m_pinning_params_t pinning_params;
+
+ /* just set everything to 0 */
+ memset(&pinning_params, 0, sizeof(m_pinning_params_t));
+ pinning_params.attributes = 0; /* ram */
+
+ venus634_send(M_PINNING_PARAMS, &pinning_params,
+ sizeof(m_pinning_params_t));
+}
+
+
/* Tell we are a car instead of a pedestrian */
void venus634_navmode(void)
{
venus634_waas();
wait_ack(M_WAAS);
+ printf_P(PSTR("pinning..."));
+ venus634_pinning();
+ wait_ack(M_PINNING);
+
+ printf_P(PSTR("pinning parameters..."));
+ venus634_pinning_params();
+ wait_ack(M_PINNING_PARAMS);
+
printf_P(PSTR("rate..."));
venus634_rate();
wait_ack(M_RATE);