additional commenting

This commit is contained in:
waltem01 2024-03-15 08:26:20 +01:00
parent b80596a181
commit 3dcba100fe

View File

@ -143,15 +143,18 @@
// Array of instructions for drawing lines and shapes // Array of instructions for drawing lines and shapes
const instructions = [ const instructions = [
// Draw clock hands
lineInstruction(middle.x, middle.y, clock.positions?.second!), lineInstruction(middle.x, middle.y, clock.positions?.second!),
lineInstruction(middle.x, middle.y, clock.positions?.minute!), lineInstruction(middle.x, middle.y, clock.positions?.minute!),
lineInstruction(middle.x, middle.y, clock.positions?.hour!), lineInstruction(middle.x, middle.y, clock.positions?.hour!),
// Draw clock body
{ {
endpoint: 'circle', endpoint: 'circle',
x: middle.x, x: middle.x,
y: middle.y, y: middle.y,
r: Math.floor((clock.body / 100) * matrix.height) r: Math.floor((clock.body / 100) * matrix.height)
} as CircleInstruction, } as CircleInstruction,
// Update matrix to display clock
{ {
endpoint: 'update' endpoint: 'update'
} as UpdateInstruction } as UpdateInstruction