Skip to content

Commit

Permalink
update unit test results
Browse files Browse the repository at this point in the history
  • Loading branch information
ducky64 committed Apr 30, 2024
1 parent 8689ad8 commit a2130e3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions examples/BasicKeyboard/BasicKeyboard.svgpcb.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ function SwitchMatrix_2_3_sw(xy, colSpacing=1, rowSpacing=1, diodeOffset=[0.25,
index = yIndex * ncols + xIndex + 1

buttonPos = [xy[0] + colSpacing * xIndex, xy[1] + rowSpacing * yIndex]
obj.footprints[`sw[${xIndex}][${yIndex}]`] = button = board.add(
obj.footprints[`sw[${xIndex},${yIndex}]`] = button = board.add(
SW_Hotswap_Kailh_MX,
{
translate: buttonPos, rotate: 0,
id: `sw_sw[${xIndex}][${yIndex}]`
id: `sw_sw_${xIndex}_${yIndex}_`
})

diodePos = [buttonPos[0] + diodeOffset[0], buttonPos[1] + diodeOffset[1]]
obj[`d[${xIndex}][${yIndex}]`] = diode = board.add(
obj[`d[${xIndex},${yIndex}]`] = diode = board.add(
D_SMA,
{
translate: diodePos, rotate: 90,
id: `sw_d[${xIndex}][${yIndex}]`
id: `sw_d_${xIndex}_${yIndex}_`
})

// create stub wire for button -> column common line
Expand Down
6 changes: 3 additions & 3 deletions examples/IotKnob/IotKnob.svgpcb.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function NeopixelArrayCircular_4_rgb_knob(xy, rot=90, radius=1, startAngle=0, en
obj.footprints[`led[${i}]`] = led = board.add(LED_SK6812_EC15_1_5x1_5mm, {
translate: origin,
rotate: angle + rot,
id: `rgb_knob_led[${i}]`
id: `rgb_knob_led_${i}_`
})

const gndOrigin = pAdd(xy, vRotate([radius - powerRadiusOffset, 0], angle))
Expand Down Expand Up @@ -181,7 +181,7 @@ function NeopixelArrayCircular_24_rgb_ring(xy, rot=90, radius=1, startAngle=0, e
obj.footprints[`led[${i}]`] = led = board.add(LED_SK6812_EC15_1_5x1_5mm, {
translate: origin,
rotate: angle + rot,
id: `rgb_ring_led[${i}]`
id: `rgb_ring_led_${i}_`
})

const gndOrigin = pAdd(xy, vRotate([radius - powerRadiusOffset, 0], angle))
Expand Down Expand Up @@ -292,7 +292,7 @@ function NeopixelArrayCircular_6_rgb_sw(xy, rot=90, radius=1, startAngle=0, endA
obj.footprints[`led[${i}]`] = led = board.add(LED_SK6812_EC15_1_5x1_5mm, {
translate: origin,
rotate: angle + rot,
id: `rgb_sw_led[${i}]`
id: `rgb_sw_led_${i}_`
})

const gndOrigin = pAdd(xy, vRotate([radius - powerRadiusOffset, 0], angle))
Expand Down
8 changes: 4 additions & 4 deletions examples/Keyboard/Keyboard.svgpcb.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ function SwitchMatrix_2_3_sw(xy, colSpacing=1, rowSpacing=1, diodeOffset=[0.25,
index = yIndex * ncols + xIndex + 1

buttonPos = [xy[0] + colSpacing * xIndex, xy[1] + rowSpacing * yIndex]
obj.footprints[`sw[${xIndex}][${yIndex}]`] = button = board.add(
obj.footprints[`sw[${xIndex},${yIndex}]`] = button = board.add(
SW_Hotswap_Kailh_MX,
{
translate: buttonPos, rotate: 0,
id: `sw_sw[${xIndex}][${yIndex}]`
id: `sw_sw_${xIndex}_${yIndex}_`
})

diodePos = [buttonPos[0] + diodeOffset[0], buttonPos[1] + diodeOffset[1]]
obj[`d[${xIndex}][${yIndex}]`] = diode = board.add(
obj[`d[${xIndex},${yIndex}]`] = diode = board.add(
D_SMA,
{
translate: diodePos, rotate: 90,
id: `sw_d[${xIndex}][${yIndex}]`
id: `sw_d_${xIndex}_${yIndex}_`
})

// create stub wire for button -> column common line
Expand Down
8 changes: 4 additions & 4 deletions examples/LedMatrix/LedMatrix.svgpcb.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ function CharlieplexedLedMatrix_5_6_matrix(xy, colSpacing=1, rowSpacing=1) {

for (let xIndex=0; xIndex < kXCount; xIndex++) {
ledPos = [xy[0] + colSpacing * xIndex, xy[1] + rowSpacing * yIndex]
obj.footprints[`d[${yIndex}_${xIndex}]`] = led = board.add(LED_0603_1608Metric, {
obj.footprints[`led[${yIndex}_${xIndex}]`] = led = board.add(LED_0603_1608Metric, {
translate: ledPos,
id: `matrix_d[${yIndex}_${xIndex}]`
id: `matrix_led_${yIndex}_${xIndex}_`
})
rowLeds.push(led)

Expand Down Expand Up @@ -71,9 +71,9 @@ function CharlieplexedLedMatrix_5_6_matrix(xy, colSpacing=1, rowSpacing=1) {
allResistors = []
for (let xIndex=0; xIndex < kXCount; xIndex++) {
const resPos = [xy[0] + colSpacing * xIndex, xy[1] + rowSpacing * kYCount]
obj.footprints[`r[${xIndex + 1}]`] = res = board.add(R_0603_1608Metric, {
obj.footprints[`res[${xIndex + 1}]`] = res = board.add(R_0603_1608Metric, {
translate: resPos,
id: `matrix_r[${xIndex + 1}]`
id: `matrix_res_${xIndex + 1}_`
})
allResistors.push(res)

Expand Down

0 comments on commit a2130e3

Please sign in to comment.