Skip to content

Commit

Permalink
Re-fixed neopixel, updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
rf152 committed Oct 7, 2023
1 parent 7506c76 commit e45fa24
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,12 @@ works well.

# Changelog

## v3.0.3
## v3.0.4
Updated libcamera code to fit with libcamera changes.

## v3.0.3
Fixed NeoPixel code.

## v3.0.2
Moved to using ndi 5.

Expand Down
27 changes: 15 additions & 12 deletions src/ndi_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,32 @@ void NdiOutput::outputBuffer(void *mem, size_t size, int64_t timestamp_us, uint3
{
this->NDI_video_frame.p_data = (uint8_t*)mem;
NDIlib_send_send_video_v2(this->pNDI_send, &this->NDI_video_frame);
NDIlib_tally_t NDI_tally;
NDIlib_send_get_tally(this->pNDI_send, &NDI_tally, 0);
this->program = NDI_tally.on_program;
this->preview = NDI_tally.on_preview;
NDIlib_tally_t* NDI_tally;
NDIlib_send_get_tally(this->pNDI_send, NDI_tally, 0);

char pixelStatus;
std::ofstream neopixel;

if(this->isProgram())
std::cout << "PGM: " << NDI_tally->on_program << " PVW: " << NDI_tally->on_preview << std::endl;

if(NDI_tally->on_program)
{
pixelStatus = 'L';
neopixel.open(neopixelpath);
neopixel << "L";
neopixel.close();
}
else if (this->isPreview())
else if (NDI_tally->on_preview)
{
pixelStatus = 'P';
neopixel.open(neopixelpath);
neopixel << "P";
neopixel.close();
}
else
{
pixelStatus = 'N';
neopixel.open(neopixelpath);
neopixel << "N";
neopixel.close();
}
neopixel.open(neopixelpath);
neopixel << pixelStatus;
neopixel.close();
}


Expand Down

0 comments on commit e45fa24

Please sign in to comment.