Skip to content

Add GC0308#1495

Open
Ellerbach wants to merge 1 commit into
mainfrom
add-GC0308
Open

Add GC0308#1495
Ellerbach wants to merge 1 commit into
mainfrom
add-GC0308

Conversation

@Ellerbach
Copy link
Copy Markdown
Member

@Ellerbach Ellerbach commented Mar 14, 2026

Description

Add GC0308

Motivation and Context

How Has This Been Tested?

To be tested

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
  • I have added new tests to cover my changes.

Summary by CodeRabbit

  • Chores
    • Added dependency lock configuration for the Gc0308 device module
    • Established versioning configuration for the Gc0308 device module

@nfbot nfbot added Type: enhancement New feature or request Type: Documentation Improvements or additions to documentation labels Mar 14, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 14, 2026

Walkthrough

Two new configuration files are added to establish build and versioning configuration for the Gc0308 device, including NuGet dependency management and semantic versioning setup.

Changes

Cohort / File(s) Summary
Gc0308 Device Configuration
devices/Gc0308/packages.lock.json, devices/Gc0308/version.json
Introduces NuGet dependency lockfile specifying 7 nanoFramework packages and development tooling (CoreLibrary, Graphics.Core, System.Buffers, I2C, Device.Model, GitVersioning, StyleCop), and adds semantic versioning configuration defining version 1.0 with nuGet package versioning and cloud build settings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Add GC0308' is vague and lacks specificity about what GC0308 is or how it relates to the PR's actual objective of adding M5Stack CoreS3 support. Use a more descriptive title like 'Add M5Stack CoreS3 support' or 'Add GC0308 camera support for M5Stack CoreS3' to clarify the purpose and context of the change.
Linked Issues check ❓ Inconclusive The PR adds configuration files for GC0308 device support, but the linked issue #1718 requests M5Stack CoreS3 target support without clearly specifying GC0308 as the implementation mechanism. Clarify in the PR description or linked issue whether GC0308 is the complete solution for CoreS3 support or if additional components are still needed to fulfill the objective.
✅ Passed checks (3 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The two new files (packages.lock.json and version.json) are device configuration files that appear reasonably scoped to adding GC0308 device support with appropriate dependency and versioning metadata.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-GC0308
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new GC0308 (0.3MP VGA) camera sensor device binding to the devices/ collection, including configuration APIs over SCCB/I2C plus documentation and a sample project for bring-up.

Changes:

  • Introduces the Iot.Device.Gc0308 driver with register initialization tables and configuration methods (format, resolution, WB, effects, etc.).
  • Adds CameraFrame helper for working with captured RGB565 / YCbCr 4:2:2 frame buffers.
  • Adds module packaging/versioning assets (.nuspec, version.json, lock file), documentation, and a runnable sample.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
devices/Gc0308/version.json Adds module versioning configuration (Nerdbank.GitVersioning).
devices/Gc0308/packages.lock.json Adds locked restore for module dependencies.
devices/Gc0308/packages.config Declares module NuGet dependencies.
devices/Gc0308/Settings.StyleCop Adds StyleCop configuration for the new module.
devices/Gc0308/Gc0308.sln Adds a solution for the device + sample projects.
devices/Gc0308/Gc0308.nfproj Adds the nanoFramework project file for the driver library.
devices/Gc0308/Gc0308.nuspec Adds NuGet packaging metadata for publishing the driver.
devices/Gc0308/README.md Adds usage docs, feature list, limitations, and CoreS3 wiring notes.
devices/Gc0308/Properties/AssemblyInfo.cs Adds assembly metadata for the driver.
devices/Gc0308/Gc0308.cs Implements the main GC0308 driver and configuration API surface.
devices/Gc0308/Gc0308Config.cs Adds default register init tables and preset parameter tables.
devices/Gc0308/Gc0308Register.cs Defines register addresses used by the driver.
devices/Gc0308/OutputFormat.cs Adds output format enum.
devices/Gc0308/Resolution.cs Adds resolution preset enum.
devices/Gc0308/MirrorFlip.cs Adds orientation enum.
devices/Gc0308/ExposureMode.cs Adds exposure mode enum.
devices/Gc0308/WhiteBalanceMode.cs Adds white balance mode enum.
devices/Gc0308/SpecialEffect.cs Adds special effect enum.
devices/Gc0308/CameraFrame.cs Adds frame buffer helper for pixel access/conversion.
devices/Gc0308/samples/packages.config Declares sample project NuGet dependencies.
devices/Gc0308/samples/Gc0308.Samples.nfproj Adds the nanoFramework project file for the sample.
devices/Gc0308/samples/Program.cs Adds sample program demonstrating driver configuration and register reads.
devices/Gc0308/samples/Properties/AssemblyInfo.cs Adds assembly metadata for the sample.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +331 to +335
// Office / Incandescent (~3200K)
new byte[] { 0x48, 0x40, 0x5C },

// Home / Fluorescent (~4000K)
new byte[] { 0x40, 0x42, 0x50 },
Comment thread devices/Gc0308/Gc0308.cs
Comment on lines +264 to +273
public void SetSpecialEffect(SpecialEffect effect)
{
byte index = (byte)effect;
if (index >= Gc0308Config.SpecialEffectValues.Length)
{
return;
}

UpdateRegisterBits(Gc0308Register.SpecialEffect, 0x03, Gc0308Config.SpecialEffectValues[index]);
}
Comment on lines +3 to +9
<package id="nanoFramework.CoreLibrary" version="1.17.12" targetFramework="netnano1.0" />
<package id="nanoFramework.Graphics.Core" version="1.2.45" targetFramework="netnano1.0" />
<package id="nanoFramework.System.Buffers.Binary.BinaryPrimitives" version="1.2.862" targetFramework="netnano1.0" />
<package id="nanoFramework.System.Device.I2c" version="1.1.29" targetFramework="netnano1.0" />
<package id="nanoFramework.System.Device.Model" version="1.2.862" targetFramework="netnano1.0" />
<package id="Nerdbank.GitVersioning" version="3.9.50" developmentDependency="true" targetFramework="netnano1.0" />
<package id="StyleCop.MSBuild" version="6.2.0" targetFramework="netnano1.0" developmentDependency="true" />
Comment on lines +3 to +7
<package id="nanoFramework.CoreLibrary" version="1.17.12" targetFramework="netnano1.0" />
<package id="nanoFramework.Hardware.Esp32" version="1.6.37" targetFramework="netnano1.0" />
<package id="nanoFramework.System.Buffers.Binary.BinaryPrimitives" version="1.2.862" targetFramework="netnano1.0" />
<package id="nanoFramework.System.Device.I2c" version="1.1.29" targetFramework="netnano1.0" />
<package id="nanoFramework.System.Device.Model" version="1.2.862" targetFramework="netnano1.0" />
Comment on lines +36 to +37
<Reference Include="mscorlib, Version=1.17.12.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>packages\nanoFramework.CoreLibrary.1.17.12\lib\mscorlib.dll</HintPath>
else if (_format == OutputFormat.YCbCr422)
{
SetPixelYCbCr422(x, y, color);
}
Comment thread devices/Gc0308/Gc0308.cs
ushort colStart = (640 - 352) / 2;
ushort rowStart = (480 - 288) / 2;
SetWindowInternal(colStart, rowStart, (ushort)(352 + 8), (ushort)(288 + 8));
break;
Comment thread devices/Gc0308/Gc0308.sln
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}
Comment on lines +21 to +27
<dependencies>
<dependency id="nanoFramework.CoreLibrary" version="1.17.12" />
<dependency id="nanoFramework.Graphics.Core" version="1.2.45" />
<dependency id="nanoFramework.System.Buffers.Binary.BinaryPrimitives" version="1.2.862" />
<dependency id="nanoFramework.System.Device.I2c" version="1.1.29" />
<dependency id="nanoFramework.System.Device.Model" version="1.2.862" />
</dependencies>
Comment on lines +23 to +24
<Reference Include="mscorlib, Version=1.17.12.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.CoreLibrary.1.17.12\lib\mscorlib.dll</HintPath>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Documentation Improvements or additions to documentation Type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants