Skip to content

Commit e45fa24

Browse files
committed
Re-fixed neopixel, updated changelog
1 parent 7506c76 commit e45fa24

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,12 @@ works well.
102102

103103
# Changelog
104104

105-
## v3.0.3
105+
## v3.0.4
106106
Updated libcamera code to fit with libcamera changes.
107107

108+
## v3.0.3
109+
Fixed NeoPixel code.
110+
108111
## v3.0.2
109112
Moved to using ndi 5.
110113

src/ndi_output.cpp

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,32 @@ void NdiOutput::outputBuffer(void *mem, size_t size, int64_t timestamp_us, uint3
3434
{
3535
this->NDI_video_frame.p_data = (uint8_t*)mem;
3636
NDIlib_send_send_video_v2(this->pNDI_send, &this->NDI_video_frame);
37-
NDIlib_tally_t NDI_tally;
38-
NDIlib_send_get_tally(this->pNDI_send, &NDI_tally, 0);
39-
this->program = NDI_tally.on_program;
40-
this->preview = NDI_tally.on_preview;
37+
NDIlib_tally_t* NDI_tally;
38+
NDIlib_send_get_tally(this->pNDI_send, NDI_tally, 0);
4139

4240
char pixelStatus;
4341
std::ofstream neopixel;
4442

45-
if(this->isProgram())
43+
std::cout << "PGM: " << NDI_tally->on_program << " PVW: " << NDI_tally->on_preview << std::endl;
44+
45+
if(NDI_tally->on_program)
4646
{
47-
pixelStatus = 'L';
47+
neopixel.open(neopixelpath);
48+
neopixel << "L";
49+
neopixel.close();
4850
}
49-
else if (this->isPreview())
51+
else if (NDI_tally->on_preview)
5052
{
51-
pixelStatus = 'P';
53+
neopixel.open(neopixelpath);
54+
neopixel << "P";
55+
neopixel.close();
5256
}
5357
else
5458
{
55-
pixelStatus = 'N';
59+
neopixel.open(neopixelpath);
60+
neopixel << "N";
61+
neopixel.close();
5662
}
57-
neopixel.open(neopixelpath);
58-
neopixel << pixelStatus;
59-
neopixel.close();
6063
}
6164

6265

0 commit comments

Comments
 (0)