Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e11f5c6

Browse filesBrowse files
authored
Update post review
1 parent 423d715 commit e11f5c6
Copy full SHA for e11f5c6

File tree

5 files changed

+17
-7
lines changed
Filter options

5 files changed

+17
-7
lines changed

‎libraries/Arduino_H7_Video/docs/api.md

Copy file name to clipboardExpand all lines: libraries/Arduino_H7_Video/docs/api.md
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The main class for managing the video controller and the display.
1414
| `public ` [`Arduino_H7_Video`](#public-arduino_h7_videoint-width-int-height-h7displayshield-shield) | Construct a new Arduino_H7_Video object with the specified width, height, and display shield. |
1515
| `public int` [`begin`](#public-int-begin) | Initialize the video controller and display. |
1616
| `public void` [`end`](#public-void-end) | De-initialize the video controller and display. |
17+
| `public bool` [`detect`](#public-bool-detect) | Checks if the display is connected. |
1718
| `public int` [`width`](#public-int-width) | Get the width of the display. |
1819
| `public int` [`height`](#public-int-height) | Get the height of the display. |
1920
| `public bool` [`isRotated`](#public-bool-isrotated) | Check if the display is rotated. |
@@ -54,6 +55,15 @@ De-initialize the video controller and display.
5455

5556
---
5657

58+
### `public bool` [`detect`](#)`()`
59+
60+
Checks if the display is connected.
61+
62+
#### Returns
63+
`bool`: True if the display is connected, False otherwis.
64+
65+
---
66+
5767
### `public int` [`width`](#)`()`
5868

5969
Get the width of the display.

‎libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp

Copy file name to clipboardExpand all lines: libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ bool Arduino_H7_Video::isRotated() {
179179
return _rotated;
180180
}
181181

182-
int Arduino_H7_Video::getStatus()
182+
bool Arduino_H7_Video::getStatus()
183183
{
184-
return _shield->getStatus();
184+
return (_shield->getStatus() > 0);
185185
}
186186

187187
void Arduino_H7_Video::end() {

‎libraries/Arduino_H7_Video/src/Arduino_H7_Video.h

Copy file name to clipboardExpand all lines: libraries/Arduino_H7_Video/src/Arduino_H7_Video.h
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ class Arduino_H7_Video
107107
bool isRotated();
108108

109109
/**
110-
* @brief Get the status of the display.
110+
* @brief Checks if the display is connected.
111111
*
112-
* @return int The Status of the display.
112+
* @return true if the display is connected, false otherwise.
113113
*/
114-
int getStatus();
114+
bool detect();
115115

116116
#ifdef HAS_ARDUINOGRAPHICS
117117
/**

‎libraries/Arduino_H7_Video/src/H7DisplayShield.cpp

Copy file name to clipboardExpand all lines: libraries/Arduino_H7_Video/src/H7DisplayShield.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ int GigaDisplayShieldClass::getEdidMode(int h, int v) {
1919
}
2020

2121
int GigaDisplayShieldClass::getStatus() {
22-
return 1;
22+
return 1; // TODO: Not implemented;
2323
}
2424

2525
int USBCVideoClass::init(int edidmode) {

‎libraries/Arduino_H7_Video/src/anx7625.cpp

Copy file name to clipboardExpand all lines: libraries/Arduino_H7_Video/src/anx7625.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ bool anx7625_is_power_provider(uint8_t bus) {
631631
}
632632

633633
int anx7625_get_hpd_event(uint8_t bus) {
634-
int ret = anx7625_hpd_change_detect(bus);;
634+
int ret = anx7625_hpd_change_detect(bus);
635635
return ret;
636636
}
637637

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.