Skip to content

Commit

Permalink
GPS init after modem is initialized.
Browse files Browse the repository at this point in the history
Changed:
* Fixed errors related to GPS initialization in tracker sample
  • Loading branch information
jaredwolff committed Mar 9, 2023
1 parent f802216 commit 90b106b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
&i2c1 {
lis2dh@18 {
compatible = "st,lis2dh";
label = "LIS2DH";
reg = <0x18>;
irq-gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>, <&gpio0 30 GPIO_ACTIVE_HIGH>;
disconnect-sdo-sa0-pull-up;
Expand Down
9 changes: 9 additions & 0 deletions samples/tracker/boards/circuitdojo_feather_nrf9160_ns.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,13 @@
status = "okay";
current-speed = <115200>;
/delete-property/ rx-pin;
};

&i2c1 {
lis2dh@18 {
compatible = "st,lis2dh";
reg = <0x18>;
irq-gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>, <&gpio0 30 GPIO_ACTIVE_HIGH>;
disconnect-sdo-sa0-pull-up;
};
};
10 changes: 5 additions & 5 deletions samples/tracker/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,6 @@ int main(void)
app_indication_set(app_indication_glow);
#endif

/* Setup gps */
err = app_gps_setup();
if (err)
LOG_ERR("Unable to setup GPS. Err: %i", err);

/* Configure dfu handler*/
nrf_modem_lib_dfu_handler();

Expand All @@ -204,6 +199,11 @@ int main(void)
if (err)
LOG_ERR("Failed to init. Err: %i", err);

/* Setup gps */
err = app_gps_setup();
if (err)
LOG_ERR("Unable to setup GPS. Err: %i", err);

/* Configure modem info module*/
err = modem_info_init();
if (err)
Expand Down

0 comments on commit 90b106b

Please sign in to comment.