Skip to content

Feat/mockanddocker - #15

Merged
miyatakazuya merged 19 commits into
mainfrom
feat/mockanddocker
May 15, 2026
Merged

Feat/mockanddocker#15
miyatakazuya merged 19 commits into
mainfrom
feat/mockanddocker

Conversation

@miyatakazuya

@miyatakazuya miyatakazuya commented May 8, 2026

Copy link
Copy Markdown
Contributor

closes #16 #17

Implements mock_camera, which allows the server to work without a physical camera for testing purposes.

  • Migrated some additional configuration options to picam.json (ex. Image size, network, timeouts, etc).
  • Implemented Pi Docker Image, allowing for project compilation on non-pi devices.

Testing:

  • To test the changes, please pull the branch and then build the image locally using make build-docker.
  • Check executable can be built & ran.

@miyatakazuya
miyatakazuya force-pushed the feat/mockanddocker branch 2 times, most recently from 72a2f42 to 41f265f Compare May 8, 2026 02:00
@miyatakazuya miyatakazuya self-assigned this May 8, 2026
@miyatakazuya
miyatakazuya marked this pull request as ready for review May 9, 2026 20:05
@AskewParity

AskewParity commented May 9, 2026

Copy link
Copy Markdown
Contributor

I can run and build it on my mac (not my desktop, but I haven't investigated why). I don't get very far in running it since there are no mock images. Where should I get the mock images?

In lieu of that, the README should be updated.

@miyatakazuya

Copy link
Copy Markdown
Contributor Author

images from the last test flight

This should go in the images folder, I wasn't sure if we should just have the images in the repo... But i will update the README

@AskewParity AskewParity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it, it looks good with the exception of two things

  • I could not build on my x86 machine
  • When running the binary, I get [22:37:48.061218138] [20] ERROR DmaBufAllocator dma_buf_allocator.cpp:119 Could not open any dma-buf provider

The request changes is mainly for the README.

Comment thread src/mock_camera.cpp Outdated
Comment on lines +47 to +53
bool should_send = false;
RPICam::send_count_mutex.lock();
if (RPICam::send_count > 0) {
RPICam::send_count--;
should_send = true;
}
RPICam::send_count_mutex.unlock();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably use continue instead of the boolean

Comment thread src/mock_camera.cpp Outdated
LOG_F(WARNING, "Image dimensions %dx%d do not match config %dx%d. Processing might be corrupted.", img_w, img_h, width, height);
}

// YUV420 Conversion

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not have a function for this? Lol

@miyatakazuya
miyatakazuya merged commit e6ddd48 into main May 15, 2026
1 check passed
@miyatakazuya
miyatakazuya deleted the feat/mockanddocker branch May 15, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker Image

2 participants