Skip to content

Commit d8c4253

Browse files
committed
fix doc link; formatting cleanup
1 parent 9ac74f5 commit d8c4253

File tree

12 files changed

+32
-30
lines changed

12 files changed

+32
-30
lines changed

examples/Example-01_Basic/Example-01_Basic.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
https://github.com/sparkfun/SparkFun_Qwiic_TMF882X_Arduino_Library
1919
2020
Documentation:
21-
https://sparkfun.github.io/SparkFun_Qwiic_OLED_Arduino_Library/
21+
https://sparkfun.github.io/SparkFun_Qwiic_TMF882X_Arduino_Library/
2222
2323
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
2424
*/

examples/Example-02_Callback/Example-02_Callback.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
https://github.com/sparkfun/SparkFun_Qwiic_TMF882X_Arduino_Library
2323
2424
Documentation:
25-
https://sparkfun.github.io/SparkFun_Qwiic_OLED_Arduino_Library/
25+
https://sparkfun.github.io/SparkFun_Qwiic_TMF882X_Arduino_Library/
2626
2727
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
2828
*/
@@ -35,7 +35,7 @@ SparkFun_TMF882X myTMF882X;
3535

3636
#define NUMBER_OF_SAMPLES_TO_TAKE 4
3737

38-
int nSample =0; // used to count how the number of measurements taken.
38+
int nSample = 0; // used to count how the number of measurements taken.
3939

4040

4141
// Define our measurement callback function. The Library calls this when a
@@ -54,7 +54,7 @@ void onMeasurementCallback(struct tmf882x_msg_meas_results *myResults)
5454
Serial.print("Result Number: "); Serial.print(myResults->result_num);
5555
Serial.print(" Number of Results: "); Serial.println(myResults->num_results);
5656

57-
for(uint32_t i = 0; i < myResults->num_results; ++i)
57+
for(int i = 0; i < myResults->num_results; ++i)
5858
{
5959
Serial.print(" conf: "); Serial.print(myResults->results[i].confidence);
6060
Serial.print(" distance mm: "); Serial.print(myResults->results[i].distance_mm);
@@ -105,7 +105,7 @@ void loop()
105105
Serial.println(" data samples.");
106106
Serial.println();
107107

108-
nSample=0;
108+
nSample = 0;
109109
myTMF882X.startMeasuring(NUMBER_OF_SAMPLES_TO_TAKE);
110110

111111
Serial.println("---------------------------------------------------------\n\n");

examples/Example-03_Stop/Example-03_Stop.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
https://github.com/sparkfun/SparkFun_Qwiic_TMF882X_Arduino_Library
2323
2424
Documentation:
25-
https://sparkfun.github.io/SparkFun_Qwiic_OLED_Arduino_Library/
25+
https://sparkfun.github.io/SparkFun_Qwiic_TMF882X_Arduino_Library/
2626
2727
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
2828
*/
@@ -36,7 +36,7 @@ SparkFun_TMF882X myTMF882X;
3636

3737
#define NUMBER_OF_SAMPLES_TO_TAKE 4
3838

39-
int nSample =0;
39+
int nSample = 0;
4040

4141
// Define our measurement callback function. The Library calls this when a
4242
// measurment is taken.
@@ -53,7 +53,7 @@ void onMeasurementCallback(struct tmf882x_msg_meas_results *myResults)
5353
Serial.print("Result Number: "); Serial.print(myResults->result_num);
5454
Serial.print(" Number of Results: "); Serial.println(myResults->num_results);
5555

56-
for(uint32_t i = 0; i < myResults->num_results; ++i)
56+
for(int i = 0; i < myResults->num_results; ++i)
5757
{
5858
Serial.print(" conf: "); Serial.print(myResults->results[i].confidence);
5959
Serial.print(" distance mm: "); Serial.print(myResults->results[i].distance_mm);
@@ -110,7 +110,7 @@ void loop()
110110
Serial.println(" data samples.");
111111
Serial.println();
112112

113-
nSample=0;
113+
nSample = 0;
114114

115115
// Start taking samples. Note - no stop condition is specified. This is handled
116116
// in the measurement callback function above.

examples/Example-04_Timeout/Example-04_Timeout.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
https://github.com/sparkfun/SparkFun_Qwiic_TMF882X_Arduino_Library
2626
2727
Documentation:
28-
https://sparkfun.github.io/SparkFun_Qwiic_OLED_Arduino_Library/
28+
https://sparkfun.github.io/SparkFun_Qwiic_TMF882X_Arduino_Library/
2929
3030
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
3131
*/

examples/Example-05_Verbose/Example-05_Verbose.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
https://github.com/sparkfun/SparkFun_Qwiic_TMF882X_Arduino_Library
2323
2424
Documentation:
25-
https://sparkfun.github.io/SparkFun_Qwiic_OLED_Arduino_Library/
25+
https://sparkfun.github.io/SparkFun_Qwiic_TMF882X_Arduino_Library/
2626
2727
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
2828
*/

examples/Example-06_Config/Example-06_Config.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
https://github.com/sparkfun/SparkFun_Qwiic_TMF882X_Arduino_Library
2222
2323
Documentation:
24-
https://sparkfun.github.io/SparkFun_Qwiic_OLED_Arduino_Library/
24+
https://sparkfun.github.io/SparkFun_Qwiic_TMF882X_Arduino_Library/
2525
2626
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
2727
*/
@@ -68,7 +68,7 @@ void setup()
6868

6969
// printout a message
7070
Serial.print("The update of the TMF882X Report Period ");
71-
Serial.println( (bConfigSet ? "Succeeded" : "Failed"));
71+
Serial.println( (bConfigSet ? "Succeeded" : "Failed") );
7272

7373
// Get the unique identifier from our connected device.
7474
struct tmf882x_mode_app_dev_UID devUID;

examples/Example-07_Firmware/Example-07_Firmware.ino

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
https://github.com/sparkfun/SparkFun_Qwiic_TMF882X_Arduino_Library
2525
2626
Documentation:
27-
https://sparkfun.github.io/SparkFun_Qwiic_OLED_Arduino_Library/
27+
https://sparkfun.github.io/SparkFun_Qwiic_TMF882X_Arduino_Library/
2828
2929
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
3030
*/
@@ -41,7 +41,6 @@
4141

4242
SparkFun_TMF882X myTMF882X;
4343

44-
4544
static struct tmf882x_msg_meas_results myResults;
4645

4746
void setup()
@@ -85,7 +84,7 @@ void loop()
8584
Serial.print(" Result Number: "); Serial.print(myResults.result_num);
8685
Serial.print(" Number of Results: "); Serial.println(myResults.num_results);
8786

88-
for (uint32_t i = 0; i < myResults.num_results; ++i)
87+
for (int i = 0; i < myResults.num_results; ++i)
8988
{
9089
Serial.print(" conf: "); Serial.print(myResults.results[i].confidence);
9190
Serial.print(" distance mm: "); Serial.print(myResults.results[i].distance_mm);

examples/Example-08_FactoryCal/Example-08_FactoryCal.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
https://github.com/sparkfun/SparkFun_Qwiic_TMF882X_Arduino_Library
2020
2121
Documentation:
22-
https://sparkfun.github.io/SparkFun_Qwiic_OLED_Arduino_Library/
22+
https://sparkfun.github.io/SparkFun_Qwiic_TMF882X_Arduino_Library/
2323
2424
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
2525
*/
@@ -88,7 +88,7 @@ void setup()
8888
Serial.println(factoryCal.calib_len);
8989

9090
Serial.println("Calibration Data:");
91-
for (int i=0; i < factoryCal.calib_len; i++)
91+
for (int i = 0; i < factoryCal.calib_len; i++)
9292
{
9393
Serial.print(" "); Serial.print(factoryCal.data[i]);
9494

examples/Example-09_SPADMap/Example-09_SPADMap.ino

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
https://github.com/sparkfun/SparkFun_Qwiic_TMF882X_Arduino_Library
2424
2525
Documentation:
26-
https://sparkfun.github.io/SparkFun_Qwiic_OLED_Arduino_Library/
26+
https://sparkfun.github.io/SparkFun_Qwiic_TMF882X_Arduino_Library/
2727
2828
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
2929
*/
@@ -89,7 +89,9 @@ void setup()
8989

9090
// Now set some config parameters to support the spad map
9191
struct tmf882x_mode_app_config tofConfig;
92-
if (!myTMF882X.getTMF882XConfig(tofConfig)) {
92+
93+
if (!myTMF882X.getTMF882XConfig(tofConfig))
94+
{
9395
Serial.println("Error - unable to get device configuration.");
9496
while(1){}
9597
}
@@ -98,7 +100,8 @@ void setup()
98100
// - set the reporting period to 500 milliseconds
99101
tofConfig.report_period_ms = 500;
100102

101-
if (!myTMF882X.setTMF882XConfig(tofConfig)) {
103+
if (!myTMF882X.setTMF882XConfig(tofConfig))
104+
{
102105
Serial.println("Error - unable to set device configuration.");
103106
while(1){}
104107
}
@@ -117,7 +120,7 @@ void loop()
117120
Serial.print(" Result Number: "); Serial.print(myResults.result_num);
118121
Serial.print(" Number of Results: "); Serial.println(myResults.num_results);
119122

120-
for (uint32_t i = 0; i < myResults.num_results; ++i)
123+
for (int i = 0; i < myResults.num_results; ++i)
121124
{
122125
Serial.print(" conf: "); Serial.print(myResults.results[i].confidence);
123126
Serial.print(" distance mm: "); Serial.print(myResults.results[i].distance_mm);

examples/Example-10_CustomSPADMap/Example-10_CustomSPADMap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
https://github.com/sparkfun/SparkFun_Qwiic_TMF882X_Arduino_Library
1919
2020
Documentation:
21-
https://sparkfun.github.io/SparkFun_Qwiic_OLED_Arduino_Library/
21+
https://sparkfun.github.io/SparkFun_Qwiic_TMF882X_Arduino_Library/
2222
2323
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
2424
*/

examples/Example-10_CustomSPADMap/Example-10_CustomSPADMap.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
https://github.com/sparkfun/SparkFun_Qwiic_TMF882X_Arduino_Library
1919
2020
Documentation:
21-
https://sparkfun.github.io/SparkFun_Qwiic_OLED_Arduino_Library/
21+
https://sparkfun.github.io/SparkFun_Qwiic_TMF882X_Arduino_Library/
2222
2323
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
2424
*/
@@ -57,6 +57,7 @@ void setup()
5757

5858
// First set some config parameters to support the spad map
5959
struct tmf882x_mode_app_config tofConfig;
60+
6061
if (!myTMF882X.getTMF882XConfig(tofConfig))
6162
{
6263
Serial.println("Error - unable to get device configuration.");
@@ -99,7 +100,7 @@ void loop()
99100
Serial.print(" Result Number: "); Serial.print(myResults.result_num);
100101
Serial.print(" Number of Results: "); Serial.println(myResults.num_results);
101102

102-
for (uint32_t i = 0; i < myResults.num_results; ++i)
103+
for (int i = 0; i < myResults.num_results; ++i)
103104
{
104105
Serial.print(" conf: "); Serial.print(myResults.results[i].confidence);
105106
Serial.print(" distance mm: "); Serial.print(myResults.results[i].distance_mm);

examples/Example-11_Histogram/Example-11_Histogram.ino

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
https://github.com/sparkfun/SparkFun_Qwiic_TMF882X_Arduino_Library
1919
2020
Documentation:
21-
https://sparkfun.github.io/SparkFun_Qwiic_OLED_Arduino_Library/
21+
https://sparkfun.github.io/SparkFun_Qwiic_TMF882X_Arduino_Library/
2222
2323
SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).
2424
*/
@@ -29,7 +29,7 @@ SparkFun_TMF882X myTMF882X;
2929

3030
#define NUMBER_OF_SAMPLES_TO_TAKE 4
3131

32-
int nSample =0;
32+
int nSample = 0;
3333

3434
// For our histogram printout
3535
#define MAX_BIN_LEN 128
@@ -45,15 +45,14 @@ void onHistogramCallback(struct tmf882x_msg_histogram *myHistogram)
4545
Serial.println(nSample);
4646

4747
uint8_t zone_count = 0;
48-
for (uint32_t tdc_idx = 0; tdc_idx < myHistogram->num_tdc; ++tdc_idx)
48+
for (int tdc_idx = 0; tdc_idx < myHistogram->num_tdc; ++tdc_idx)
4949
{
50-
5150
// Histogram tag for zones, #HLONG01,#HLONG02....
5251
Serial.println();
5352
Serial.print("#HLONG");
5453
Serial.print(zone_count++);
5554

56-
for (uint32_t bin_idx = 0; bin_idx < myHistogram->num_bins; ++bin_idx) {
55+
for (int bin_idx = 0; bin_idx < myHistogram->num_bins; ++bin_idx) {
5756

5857
Serial.print((unsigned long)myHistogram->bins[tdc_idx][bin_idx]);
5958

0 commit comments

Comments
 (0)