Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for display contract changes #52

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Source/C16x9/Driver/C16x9.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using Meadow.Foundation.Graphics;
using Meadow.Foundation.Graphics.Buffers;
using Meadow.Foundation.Graphics.Buffers;
using Meadow.Foundation.ICs.IOExpanders;
using Meadow.Hardware;
using Meadow.Peripherals.Displays;

namespace Meadow.Foundation.mikroBUS.Displays
{
/// <summary>
/// Represents a mikroBUS 16x9 Click board
/// </summary>
public class C16x9 : IGraphicsDisplay
public class C16x9 : IPixelDisplay
{
/// <summary>
/// Is31fl3731 object to manage the leds
Expand Down Expand Up @@ -72,7 +72,7 @@ public C16x9(IDigitalOutputPort onOffPort, II2cBus i2cBus, byte address = (byte)
frame = 0;

this.onOffPort = onOffPort;

iS31FL3731 = new Is31fl3731(i2cBus, address);
iS31FL3731.Initialize();

Expand Down Expand Up @@ -173,7 +173,7 @@ public void Fill(Color clearColor, bool updateDisplay = false)
{
PixelBuffer.Fill(clearColor);

if(updateDisplay)
if (updateDisplay)
{
Show();
}
Expand All @@ -200,9 +200,9 @@ public void Show()
//we'll swap frames every update
frame = (byte)((frame == 0) ? 1 : 0);

for(int x = 0; x < Width; x++)
for (int x = 0; x < Width; x++)
{
for(int y = 0; y < Height; y++)
for (int y = 0; y < Height; y++)
{
iS31FL3731.SetLedPwm(frame, (byte)(x + y * Width), PixelBuffer.GetPixel(x, y).Color8bppGray);
}
Expand Down
3 changes: 2 additions & 1 deletion Source/C16x9/Sample/C16x9_Sample/MeadowApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Meadow.Devices;
using Meadow.Foundation.Graphics;
using Meadow.Foundation.mikroBUS.Displays;
using Meadow.Peripherals.Displays;
using System;

namespace C16x9_Sample
Expand All @@ -11,7 +12,7 @@ public class MeadowApp : App<F7FeatherV2>
{
//<!=SNIP=>

C16x9 c16x9;
readonly C16x9 c16x9;

public MeadowApp()
{
Expand Down
5 changes: 3 additions & 2 deletions Source/C8x8/Sample/C8x8_ProjectLab_Sample/MeadowApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Meadow.Devices;
using Meadow.Foundation.Graphics;
using Meadow.Foundation.mikroBUS.Displays;
using Meadow.Peripherals.Displays;
using System;

namespace C8x8_ProjectLab_Sample
Expand All @@ -11,8 +12,8 @@ public class MeadowApp : App<F7FeatherV2>
{
//<!=SNIP=>

C8x8 c8x8;
IProjectLabHardware projectLab;
readonly C8x8 c8x8;
readonly IProjectLabHardware projectLab;

public MeadowApp()
{
Expand Down
3 changes: 2 additions & 1 deletion Source/C8x8/Sample/C8x8_Sample/MeadowApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Meadow.Devices;
using Meadow.Foundation.Graphics;
using Meadow.Foundation.mikroBUS.Displays;
using Meadow.Peripherals.Displays;
using System;

namespace C8x8_Sample
Expand All @@ -11,7 +12,7 @@ public class MeadowApp : App<F7FeatherV2>
{
//<!=SNIP=>

C8x8 c8x8;
readonly C8x8 c8x8;

public MeadowApp()
{
Expand Down
Loading