Skip to content

Commit 1ca9b6c

Browse files
authored
Issue templates (#7)
* Issue templates * Fix guards around wifi libraries in example code
1 parent 03018a7 commit 1ca9b6c

File tree

5 files changed

+155
-2
lines changed

5 files changed

+155
-2
lines changed

.github/ISSUE_TEMPLATE/BUG.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Bug Report
2+
description: File a bug report.
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
projects: ["proffalken/3"]
6+
assignees:
7+
- proffalken
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thanks for taking the time to fill out this bug report!
13+
- type: input
14+
id: contact
15+
attributes:
16+
label: Contact Details
17+
description: How can we get in touch with you if we need more info?
18+
placeholder: ex. [email protected]
19+
validations:
20+
required: false
21+
- type: textarea
22+
id: what-happened
23+
attributes:
24+
label: What happened?
25+
description: Also tell us, what did you expect to happen?
26+
placeholder: Tell us what you see!
27+
value: "A bug happened!"
28+
validations:
29+
required: true
30+
- type: input
31+
id: version
32+
attributes:
33+
label: Version
34+
description: What version of the library are you running?
35+
default: 1.0.1
36+
validations:
37+
required: true
38+
- type: dropdown
39+
id: hardware
40+
attributes:
41+
label: What hardware are you seeing the problem on?
42+
multiple: true
43+
options:
44+
- ESP32
45+
- ESP8266
46+
- RP2040
47+
- Something else
48+
- type: input
49+
id: other_hardware
50+
attributes:
51+
label: Other hardware
52+
description: If you're using something other than the ones in the list above, please put it here
53+
default: 1.0.1
54+
validations:
55+
required: false
56+
- type: textarea
57+
id: logs
58+
attributes:
59+
label: Relevant log output
60+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
61+
render: shell
62+
- type: checkboxes
63+
id: terms
64+
attributes:
65+
label: Code of Conduct
66+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/proffalken/otel-embedded-cpp/blob/main/CODE_OF_CONDUCT).
67+
options:
68+
- label: I agree to follow this project's Code of Conduct
69+
required: true
70+
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Feature Request
2+
description: Need something new added to the library? This is the form for you!
3+
title: "[Feature]: "
4+
labels: ["feature", "triage"]
5+
projects: ["proffalken/3"]
6+
assignees:
7+
- proffalken
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thanks for taking the time to request a new feature!
13+
- type: input
14+
id: contact
15+
attributes:
16+
label: Contact Details
17+
description: How can we get in touch with you if we need more info?
18+
placeholder: ex. [email protected]
19+
validations:
20+
required: false
21+
- type: textarea
22+
id: what--do-you-want-to-see?
23+
attributes:
24+
label: What do you want to see?
25+
description: What are we missing in our project?
26+
placeholder: Tell us what you see!
27+
value: "A new feature"
28+
validations:
29+
required: true
30+
- type: dropdown
31+
id: hardware
32+
attributes:
33+
label: What hardware are you using?
34+
multiple: true
35+
options:
36+
- ESP32
37+
- ESP8266
38+
- RP2040
39+
- Something else
40+
- type: input
41+
id: other_hardware
42+
attributes:
43+
label: Other hardware
44+
description: If you're using something other than the ones in the list above, please put it here
45+
validations:
46+
required: false
47+
- type: textarea
48+
id: other info
49+
attributes:
50+
label: What else can you tell us to help us implement this?
51+
description: Is there another project that does similar things? Do you have example code? Please post it here!
52+
render: shell
53+
- type: checkboxes
54+
id: terms
55+
attributes:
56+
label: Code of Conduct
57+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/proffalken/otel-embedded-cpp/blob/main/CODE_OF_CONDUCT).
58+
options:
59+
- label: I agree to follow this project's Code of Conduct
60+
required: true
61+

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,19 @@ The example code shows how to do this with the `time` library and NTP.
7777

7878
```cpp
7979
#include <Arduino.h>
80-
#include <WiFi.h>
8180
#include <time.h>
8281

82+
#if defined(ESP32)
83+
#include <WiFi.h>
84+
#elif defined(ESP8266)
85+
#include <ESP8266WiFi.h>
86+
#elif defined(ARDUINO_ARCH_RP2040)
87+
// Earle Philhower’s Arduino-Pico core exposes a WiFi.h for Pico W
88+
#include <WiFi.h>
89+
#else
90+
#error "This example targets ESP32, ESP8266, or RP2040 (Pico W) with WiFi."
91+
#endif
92+
8393
// ---------------------------------------------------------
8494
// Import Open Telemetry Libraries
8595
// ---------------------------------------------------------

src/main.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
#include <Arduino.h>
2-
#include <WiFi.h>
32
#include <time.h>
43

4+
// Include the appropriate WiFi library
5+
#if defined(ESP32)
6+
#include <WiFi.h>
7+
#elif defined(ESP8266)
8+
#include <ESP8266WiFi.h>
9+
#elif defined(ARDUINO_ARCH_RP2040)
10+
// Earle Philhower’s Arduino-Pico core exposes a WiFi.h for Pico W
11+
#include <WiFi.h>
12+
#else
13+
#error "This example targets ESP32, ESP8266, or RP2040 (Pico W) with WiFi."
14+
#endif
15+
516
// ---------------------------------------------------------
617
// Import Open Telemetry Libraries
718
// ---------------------------------------------------------

0 commit comments

Comments
 (0)