diff --git a/README.md b/README.md index 8b0c2d1..1542702 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,9 @@ There are three main sections. Javadocs are published at the [GitHub Pages](https://eagrahamjr.github.io/kobots-parts/) for this project. +## Acknowledgements +- The `MatrixRain` class was inspired heavily by [pymatrix-rain](https://github.com/tech-chad/pymatrix-rain), under the MIT License. ## Other Stuff diff --git a/src/main/kotlin/crackers/kobots/app/AppCommon.kt b/src/main/kotlin/crackers/kobots/app/AppCommon.kt index 1232304..6bf2289 100644 --- a/src/main/kotlin/crackers/kobots/app/AppCommon.kt +++ b/src/main/kotlin/crackers/kobots/app/AppCommon.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/graphics/Util.kt b/src/main/kotlin/crackers/kobots/graphics/Util.kt index 50a1f23..a6cacb5 100644 --- a/src/main/kotlin/crackers/kobots/graphics/Util.kt +++ b/src/main/kotlin/crackers/kobots/graphics/Util.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.graphics import java.awt.Font diff --git a/src/main/kotlin/crackers/kobots/graphics/animation/Eyeballs.kt b/src/main/kotlin/crackers/kobots/graphics/animation/Eyeballs.kt index 9906fb3..0dc1f5b 100644 --- a/src/main/kotlin/crackers/kobots/graphics/animation/Eyeballs.kt +++ b/src/main/kotlin/crackers/kobots/graphics/animation/Eyeballs.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/graphics/animation/MatrixRain.kt b/src/main/kotlin/crackers/kobots/graphics/animation/MatrixRain.kt new file mode 100644 index 0000000..777c16b --- /dev/null +++ b/src/main/kotlin/crackers/kobots/graphics/animation/MatrixRain.kt @@ -0,0 +1,240 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package crackers.kobots.graphics.animation + +import crackers.kobots.app.AppCommon +import crackers.kobots.parts.scale +import crackers.kobots.parts.scheduleAtRate +import crackers.kobots.parts.sleep +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import java.awt.Color +import java.awt.Font +import java.awt.Graphics2D +import java.util.concurrent.Future +import java.util.concurrent.atomic.AtomicInteger +import kotlin.random.Random.Default.nextInt +import kotlin.time.Duration +import kotlin.time.Duration.Companion.milliseconds + +/** + * Draws "Matrix" movie code rain on a specified region. + */ +class MatrixRain( + private val graphics: Graphics2D, + private val x: Int, + private val y: Int, + private val width: Int, + private val height: Int, + private val displayFont: Font = Font(Font.SANS_SERIF, Font.PLAIN, 10), + private val useBold: Boolean = true, + private val leadColor: Color = Color.WHITE, + private val boldColor: Color = Color.GREEN, + private val normalColor: Color = boldColor.scale(50), + private val backgroundColor: Color = Color.BLACK, + private val updateSpeed: Duration = 50.milliseconds +) { + private val logger: Logger = LoggerFactory.getLogger("MatrixRain") + + private val maxColumns: Int + private val maxRows: Int + private val cellWidth: Int + + // available columns to use + private val availableColumns = mutableListOf() + + init { + // figure out how many rows and columns we have: use the widest character + with(graphics) { + val oldFont = font + font = displayFont + cellWidth = CHAR_LIST.maxOf { fontMetrics.stringWidth(it) } + maxColumns = width / cellWidth + maxRows = height / fontMetrics.height + // should have more than 3 columns and 5 rows + require(maxColumns > 3 && maxRows > 5) { "Not useful with less than 3 columns and/or 5 rows: $maxColumns/$maxRows" } + font = oldFont + } + availableColumns += (0 until maxColumns).toList().shuffled() + } + + private inner class LineOfStuff(val column: Int) { + private val length = nextInt(3, maxRows) + private val leadRow = AtomicInteger(0) + private val row = AtomicInteger(-1) + private val lastRow = AtomicInteger(-length) + + fun getLead() = if (leadRow.get() > maxRows) null else leadRow.getAndIncrement() + fun getNext() = when { + row.get() < 0 -> { + row.incrementAndGet() + null + } + + row.get() > maxRows -> null + else -> row.getAndIncrement() + } + + fun deleteLast() = when { + okToDelete() -> null + lastRow.get() < 0 -> { + lastRow.incrementAndGet() + null + } + + else -> lastRow.getAndIncrement() + } + + fun okToDelete() = lastRow.get() > maxRows + } + + private fun context(block: () -> Unit) { + with(graphics) { + val oldFont = font + val oldColor = color + val oldBackground = background + val oldClip = clipBounds + setClip(x, y, width, height) + + try { + font = displayFont + color = normalColor + background = backgroundColor + block() + } finally { + font = oldFont + color = oldColor + background = oldBackground + clip = oldClip + } + } + } + + private val lineList = mutableListOf() + private fun aLoop() = context { + // add any new lines if we don't have any and there are more than 3 available + if (lineList.size < maxColumns && availableColumns.size > 3) { + repeat(2) { + availableColumns.shuffle() + val x = availableColumns.removeAt(0) + lineList += LineOfStuff(x) + } + } + val removeLines = mutableListOf() + for (line in lineList) with(graphics) { + // where characters in this line will start + val lineX = line.column * cellWidth + + line.deleteLast()?.let { lineRow -> + lineX.clearCell(lineRow) + if (line.column !in availableColumns) { + availableColumns.add(line.column) + } + } + + line.getNext()?.let { lineRow -> + lineX.clearCell(lineRow) + + // if it's bold, check the bold flag, otherwise use the color + if (nextInt(1, 5) == 1) { + if (useBold) { + font = font.deriveFont(Font.BOLD) + color = normalColor + } else { + font = displayFont + color = boldColor + } + } else { + font = displayFont + color = normalColor + } + val y = lineRow * fontMetrics.height + fontMetrics.ascent + // draw random char at new location + drawString(CHAR_LIST.random(), lineX, y) + } + + line.getLead()?.let { lineRow -> + lineX.clearCell(lineRow) + + // draw the lead character using the lead color, normal font + color = leadColor + font = displayFont.deriveFont(Font.BOLD) + val y = lineRow * fontMetrics.height + fontMetrics.ascent + drawString(CHAR_LIST.random(), lineX, y) + } + + if (line.okToDelete()) { + availableColumns += line.column + removeLines += line + } + } + lineList.removeAll(removeLines) + } + + private fun Int.clearCell(row: Int) { + val topOfLine = row * graphics.fontMetrics.height + graphics.clearRect(this, topOfLine, cellWidth, graphics.fontMetrics.height) + } + + private var future: Future<*>? = null + + /** + * Start the matrix loop + */ + fun start(refresh: () -> Unit) { + future?.let { + logger.warn("Rain loop already started") + return + } + + graphics.clearRect(x, y, width, height) + future = AppCommon.executor.scheduleAtRate(updateSpeed) { + aLoop() + refresh() + } + } + + /** + * Stop it -- and then make sure it's stopped + */ + fun stop() { + future?.let { f -> + f.cancel(true) + while (!f.isDone) 5.milliseconds.sleep() + future = null + } + } + + companion object { + // @formatter:off + internal val CHAR_LIST = listOf( + "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", + "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", + "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "!", "#", "$", "%", + "^", "&", "(", ")", "-", "+", "=", "[", "]", "{", "}", "|", ";", ":", "<", ">", ",", ".", "?", "~", "`", "@", + "*", "_", "'", "\\", "/", "\"", "Ç", "È", "Ì", "Í", "Ð", "Ñ", "Ò", "×", "Ø", "Ù", "Ú", "Ý", "Þ", "ß", "à", "£", + "¤", "¥", "§", "ª", "¶", "º", "»", "¿", "Ä", "Å", "é", "ê", "í", "ï", "å", "æ", "ç", "è", "ð", "ñ", "ò", "ö", + "ø", "ù", "ý", "þ", "ā", "ć", "ĉ", "ė", "ě", "ĝ", "ģ", "ħ", "ī", "ı", "ķ", "Ľ", "Ł", "ł", "ń", "ň", "ō", "Œ", + "œ", "ŕ", "ŗ", "ś", "ŝ", "š", "ť", "ū", "ų", "Ÿ", "ź", "ż", "Ž", "ž", "ș", "ț", "ë", "Ĉ", "Ď", "ď", "Ġ", "Ř", + "°", "«", "±", "Δ", "Ξ", "Λ", "ヲ", "ア", "ウ", "エ", "オ", "カ", "キ", "ケ", "コ", "サ", "シ", "ス", "セ", "ソ", "タ", "ツ", + "テ", "ナ", "ニ", "ヌ", "ネ", "ハ", "ヒ", "ホ", "マ", "ミ", "ム", "メ", "モ", "ヤ", "ユ", "ラ", "リ", "ワ", "ヘ", "イ", "ク", "チ", + "ト", "ノ", "フ", "ヨ", "ル", "レ", "ロ", "ン", "0", "1", "2", "3", "4", "5", "7", "8", "9", "Z", ":", ".", "=", "*", + "+", "-", "<", ">" + ) + // @formatter:on + } +} diff --git a/src/main/kotlin/crackers/kobots/graphics/animation/PointerGauge.kt b/src/main/kotlin/crackers/kobots/graphics/animation/PointerGauge.kt index 60f2619..901d908 100644 --- a/src/main/kotlin/crackers/kobots/graphics/animation/PointerGauge.kt +++ b/src/main/kotlin/crackers/kobots/graphics/animation/PointerGauge.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/graphics/animation/SimpleRadar.kt b/src/main/kotlin/crackers/kobots/graphics/animation/SimpleRadar.kt index c033ccd..75be2b2 100644 --- a/src/main/kotlin/crackers/kobots/graphics/animation/SimpleRadar.kt +++ b/src/main/kotlin/crackers/kobots/graphics/animation/SimpleRadar.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.graphics.animation import java.awt.Color diff --git a/src/main/kotlin/crackers/kobots/graphics/widgets/ColumnWidget.kt b/src/main/kotlin/crackers/kobots/graphics/widgets/ColumnWidget.kt index 305d4eb..22ba70c 100644 --- a/src/main/kotlin/crackers/kobots/graphics/widgets/ColumnWidget.kt +++ b/src/main/kotlin/crackers/kobots/graphics/widgets/ColumnWidget.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.graphics.widgets /** diff --git a/src/main/kotlin/crackers/kobots/graphics/widgets/DirectionPointer.kt b/src/main/kotlin/crackers/kobots/graphics/widgets/DirectionPointer.kt index 92677b9..6bc5230 100644 --- a/src/main/kotlin/crackers/kobots/graphics/widgets/DirectionPointer.kt +++ b/src/main/kotlin/crackers/kobots/graphics/widgets/DirectionPointer.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.graphics.widgets import crackers.kobots.graphics.center diff --git a/src/main/kotlin/crackers/kobots/graphics/widgets/HorizontalPercentageIndicator.kt b/src/main/kotlin/crackers/kobots/graphics/widgets/HorizontalPercentageIndicator.kt index 2b5a383..da2cf72 100644 --- a/src/main/kotlin/crackers/kobots/graphics/widgets/HorizontalPercentageIndicator.kt +++ b/src/main/kotlin/crackers/kobots/graphics/widgets/HorizontalPercentageIndicator.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.graphics.widgets import crackers.kobots.graphics.center diff --git a/src/main/kotlin/crackers/kobots/graphics/widgets/KobotsWidget.kt b/src/main/kotlin/crackers/kobots/graphics/widgets/KobotsWidget.kt index 6f6ffe6..ea00bc9 100644 --- a/src/main/kotlin/crackers/kobots/graphics/widgets/KobotsWidget.kt +++ b/src/main/kotlin/crackers/kobots/graphics/widgets/KobotsWidget.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.graphics.widgets import java.awt.BasicStroke diff --git a/src/main/kotlin/crackers/kobots/graphics/widgets/SimpleMenuWidget.kt b/src/main/kotlin/crackers/kobots/graphics/widgets/SimpleMenuWidget.kt index 22e84a0..5416a3b 100644 --- a/src/main/kotlin/crackers/kobots/graphics/widgets/SimpleMenuWidget.kt +++ b/src/main/kotlin/crackers/kobots/graphics/widgets/SimpleMenuWidget.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.graphics.widgets import crackers.kobots.graphics.center diff --git a/src/main/kotlin/crackers/kobots/graphics/widgets/UpDownIndicator.kt b/src/main/kotlin/crackers/kobots/graphics/widgets/UpDownIndicator.kt index a46875d..e79019b 100644 --- a/src/main/kotlin/crackers/kobots/graphics/widgets/UpDownIndicator.kt +++ b/src/main/kotlin/crackers/kobots/graphics/widgets/UpDownIndicator.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.graphics.widgets import crackers.kobots.graphics.center diff --git a/src/main/kotlin/crackers/kobots/graphics/widgets/VerticalPercentageIndicator.kt b/src/main/kotlin/crackers/kobots/graphics/widgets/VerticalPercentageIndicator.kt index 50d40dc..2998e04 100644 --- a/src/main/kotlin/crackers/kobots/graphics/widgets/VerticalPercentageIndicator.kt +++ b/src/main/kotlin/crackers/kobots/graphics/widgets/VerticalPercentageIndicator.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.graphics.widgets import crackers.kobots.graphics.plus diff --git a/src/main/kotlin/crackers/kobots/mqtt/KobotsMQTT.kt b/src/main/kotlin/crackers/kobots/mqtt/KobotsMQTT.kt index 9f8f302..7cd966a 100644 --- a/src/main/kotlin/crackers/kobots/mqtt/KobotsMQTT.kt +++ b/src/main/kotlin/crackers/kobots/mqtt/KobotsMQTT.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/AbstractKobotEntity.kt b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/AbstractKobotEntity.kt index 99ea06c..f4436ef 100644 --- a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/AbstractKobotEntity.kt +++ b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/AbstractKobotEntity.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.mqtt.homeassistant import crackers.kobots.app.AppCommon.mqttClient diff --git a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotLightController.kt b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotLightController.kt index 6270b93..a0c43b1 100644 --- a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotLightController.kt +++ b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotLightController.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.mqtt.homeassistant import com.diozero.api.PwmOutputDevice diff --git a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotLightDevices.kt b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotLightDevices.kt index d205e0d..6532458 100644 --- a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotLightDevices.kt +++ b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotLightDevices.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.mqtt.homeassistant import crackers.kobots.mqtt.homeassistant.LightColor.Companion.toLightColor diff --git a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotNumberEntity.kt b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotNumberEntity.kt index b83e06f..ef5317e 100644 --- a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotNumberEntity.kt +++ b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotNumberEntity.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.mqtt.homeassistant import org.json.JSONObject diff --git a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotSelectEntity.kt b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotSelectEntity.kt index cb1d485..7c3e922 100644 --- a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotSelectEntity.kt +++ b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotSelectEntity.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.mqtt.homeassistant import org.json.JSONObject diff --git a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotSensor.kt b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotSensor.kt index c5a8c07..36fb854 100644 --- a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotSensor.kt +++ b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotSensor.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.mqtt.homeassistant import crackers.kobots.mqtt.homeassistant.KobotAnalogSensor.Companion.AnalogDevice diff --git a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotSwitch.kt b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotSwitch.kt index bcf8861..f632baf 100644 --- a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotSwitch.kt +++ b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotSwitch.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.mqtt.homeassistant import com.diozero.api.DigitalOutputDevice diff --git a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotTextEntity.kt b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotTextEntity.kt index 991e945..87c2f0f 100644 --- a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotTextEntity.kt +++ b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/KobotTextEntity.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.mqtt.homeassistant import java.util.concurrent.atomic.AtomicReference diff --git a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/PimoroniShimController.kt b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/PimoroniShimController.kt index 340c736..6eeb9c2 100644 --- a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/PimoroniShimController.kt +++ b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/PimoroniShimController.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.mqtt.homeassistant import crackers.kobots.devices.lighting.PimoroniLEDShim diff --git a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/PixelBufController.kt b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/PixelBufController.kt index 64dd8d8..86be42e 100644 --- a/src/main/kotlin/crackers/kobots/mqtt/homeassistant/PixelBufController.kt +++ b/src/main/kotlin/crackers/kobots/mqtt/homeassistant/PixelBufController.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.mqtt.homeassistant import crackers.kobots.devices.lighting.PixelBuf diff --git a/src/main/kotlin/crackers/kobots/parts/Execution.kt b/src/main/kotlin/crackers/kobots/parts/Execution.kt index 56b025e..b47e445 100644 --- a/src/main/kotlin/crackers/kobots/parts/Execution.kt +++ b/src/main/kotlin/crackers/kobots/parts/Execution.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.parts import com.diozero.util.SleepUtil diff --git a/src/main/kotlin/crackers/kobots/parts/Graphics.kt b/src/main/kotlin/crackers/kobots/parts/Graphics.kt index 7171294..8c1db12 100644 --- a/src/main/kotlin/crackers/kobots/parts/Graphics.kt +++ b/src/main/kotlin/crackers/kobots/parts/Graphics.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.parts import java.awt.Color diff --git a/src/main/kotlin/crackers/kobots/parts/Stuff.kt b/src/main/kotlin/crackers/kobots/parts/Stuff.kt index 1a1c431..9666b9f 100644 --- a/src/main/kotlin/crackers/kobots/parts/Stuff.kt +++ b/src/main/kotlin/crackers/kobots/parts/Stuff.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.parts import org.json.JSONObject @@ -9,8 +25,11 @@ import java.util.concurrent.CopyOnWriteArrayList * Just stuff. */ +// variants on a theme const val on = true +const val ON = true const val off = false +const val OFF = false /** * Extension function on a JSON object to get a on/off status as a boolean. @@ -50,3 +69,5 @@ inline fun > enumValue(s: String): T? = try { } catch (_: IllegalArgumentException) { null } + +fun Float.toFahrenheit(): Float = (this * 9f / 5f) + 32 diff --git a/src/main/kotlin/crackers/kobots/parts/app/EventBus.kt b/src/main/kotlin/crackers/kobots/parts/app/EventBus.kt index a7db4a6..a5784f8 100644 --- a/src/main/kotlin/crackers/kobots/parts/app/EventBus.kt +++ b/src/main/kotlin/crackers/kobots/parts/app/EventBus.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/parts/app/KobotSleep.kt b/src/main/kotlin/crackers/kobots/parts/app/KobotSleep.kt index 2c6c93d..81c01d6 100644 --- a/src/main/kotlin/crackers/kobots/parts/app/KobotSleep.kt +++ b/src/main/kotlin/crackers/kobots/parts/app/KobotSleep.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/parts/app/io/NeoKeyHandler.kt b/src/main/kotlin/crackers/kobots/parts/app/io/NeoKeyHandler.kt index 5b124d2..d185601 100644 --- a/src/main/kotlin/crackers/kobots/parts/app/io/NeoKeyHandler.kt +++ b/src/main/kotlin/crackers/kobots/parts/app/io/NeoKeyHandler.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/parts/app/io/NeoKeyMenu.kt b/src/main/kotlin/crackers/kobots/parts/app/io/NeoKeyMenu.kt index f94f1b8..f0d3b3d 100644 --- a/src/main/kotlin/crackers/kobots/parts/app/io/NeoKeyMenu.kt +++ b/src/main/kotlin/crackers/kobots/parts/app/io/NeoKeyMenu.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/parts/app/io/SmallMenuDisplay.kt b/src/main/kotlin/crackers/kobots/parts/app/io/SmallMenuDisplay.kt index 6453f7b..aa96fdb 100644 --- a/src/main/kotlin/crackers/kobots/parts/app/io/SmallMenuDisplay.kt +++ b/src/main/kotlin/crackers/kobots/parts/app/io/SmallMenuDisplay.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/parts/app/io/StatusColumnDisplay.kt b/src/main/kotlin/crackers/kobots/parts/app/io/StatusColumnDisplay.kt index 9285717..85d6bc3 100644 --- a/src/main/kotlin/crackers/kobots/parts/app/io/StatusColumnDisplay.kt +++ b/src/main/kotlin/crackers/kobots/parts/app/io/StatusColumnDisplay.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/parts/movement/Action.kt b/src/main/kotlin/crackers/kobots/parts/movement/Action.kt index 1438c4d..bf594bf 100644 --- a/src/main/kotlin/crackers/kobots/parts/movement/Action.kt +++ b/src/main/kotlin/crackers/kobots/parts/movement/Action.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.parts.movement import crackers.kobots.parts.app.KobotSleep diff --git a/src/main/kotlin/crackers/kobots/parts/movement/ActionSequence.kt b/src/main/kotlin/crackers/kobots/parts/movement/ActionSequence.kt index e3ff6f6..18dbd77 100644 --- a/src/main/kotlin/crackers/kobots/parts/movement/ActionSequence.kt +++ b/src/main/kotlin/crackers/kobots/parts/movement/ActionSequence.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/parts/movement/Linear.kt b/src/main/kotlin/crackers/kobots/parts/movement/Linear.kt index 1bf6fb0..9aa56ec 100644 --- a/src/main/kotlin/crackers/kobots/parts/movement/Linear.kt +++ b/src/main/kotlin/crackers/kobots/parts/movement/Linear.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/parts/movement/Movements.kt b/src/main/kotlin/crackers/kobots/parts/movement/Movements.kt index 28c1c3b..d3c6f9e 100644 --- a/src/main/kotlin/crackers/kobots/parts/movement/Movements.kt +++ b/src/main/kotlin/crackers/kobots/parts/movement/Movements.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/parts/movement/Rotator.kt b/src/main/kotlin/crackers/kobots/parts/movement/Rotator.kt index 8d1da86..0edd4b1 100644 --- a/src/main/kotlin/crackers/kobots/parts/movement/Rotator.kt +++ b/src/main/kotlin/crackers/kobots/parts/movement/Rotator.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/kotlin/crackers/kobots/parts/movement/SequenceExecutor.kt b/src/main/kotlin/crackers/kobots/parts/movement/SequenceExecutor.kt index d1e0aa9..f215876 100644 --- a/src/main/kotlin/crackers/kobots/parts/movement/SequenceExecutor.kt +++ b/src/main/kotlin/crackers/kobots/parts/movement/SequenceExecutor.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/kotlin/crackers/kobots/ProjectLevelTestConfig.kt b/src/test/kotlin/crackers/kobots/ProjectLevelTestConfig.kt index d8a0a67..8a47eb5 100644 --- a/src/test/kotlin/crackers/kobots/ProjectLevelTestConfig.kt +++ b/src/test/kotlin/crackers/kobots/ProjectLevelTestConfig.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/kotlin/crackers/kobots/RunTheMatrix.kt b/src/test/kotlin/crackers/kobots/RunTheMatrix.kt new file mode 100644 index 0000000..27cc3c2 --- /dev/null +++ b/src/test/kotlin/crackers/kobots/RunTheMatrix.kt @@ -0,0 +1,55 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package crackers.kobots + +import crackers.kobots.graphics.animation.MatrixRain +import java.awt.BorderLayout +import java.awt.Dimension +import java.awt.Font +import java.awt.Graphics2D +import java.awt.image.BufferedImage +import javax.swing.ImageIcon +import javax.swing.JFrame +import javax.swing.JLabel + +/** + * Runs the matrix rain in a simple window. + */ +fun main() { + val frame = JFrame("Matrix Rain").apply { + isResizable = true + size = Dimension(800, 400) + defaultCloseOperation = JFrame.EXIT_ON_CLOSE + layout = BorderLayout() + } + + val image = BufferedImage(800, 400, BufferedImage.TYPE_INT_RGB) + val label = JLabel(ImageIcon(image)) + frame.add(label, BorderLayout.CENTER) + frame.isVisible = true + MatrixRain( + image.graphics as Graphics2D, + 0, + 0, + 800, + 400, + displayFont = Font(Font.SANS_SERIF, Font.PLAIN, 8), + useBold = false + ).apply { + start(frame::repaint) + } +} diff --git a/src/test/kotlin/crackers/kobots/mqtt/KobotLightTest.kt b/src/test/kotlin/crackers/kobots/mqtt/KobotLightTest.kt index 8c55788..762f07d 100644 --- a/src/test/kotlin/crackers/kobots/mqtt/KobotLightTest.kt +++ b/src/test/kotlin/crackers/kobots/mqtt/KobotLightTest.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2022-2024 by E. A. Graham, Jr. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package crackers.kobots.mqtt import crackers.kobots.app.AppCommon.mqttClient diff --git a/src/test/kotlin/crackers/kobots/parts/movement/ActionSequenceTest.kt b/src/test/kotlin/crackers/kobots/parts/movement/ActionSequenceTest.kt index 3a7cf52..b800588 100644 --- a/src/test/kotlin/crackers/kobots/parts/movement/ActionSequenceTest.kt +++ b/src/test/kotlin/crackers/kobots/parts/movement/ActionSequenceTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/kotlin/crackers/kobots/parts/movement/LinearTest.kt b/src/test/kotlin/crackers/kobots/parts/movement/LinearTest.kt index 8c63b13..4f7a8ba 100644 --- a/src/test/kotlin/crackers/kobots/parts/movement/LinearTest.kt +++ b/src/test/kotlin/crackers/kobots/parts/movement/LinearTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/kotlin/crackers/kobots/parts/movement/Mocks.kt b/src/test/kotlin/crackers/kobots/parts/movement/Mocks.kt index 1f952be..5bb3978 100644 --- a/src/test/kotlin/crackers/kobots/parts/movement/Mocks.kt +++ b/src/test/kotlin/crackers/kobots/parts/movement/Mocks.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/kotlin/crackers/kobots/parts/movement/RotatorTest.kt b/src/test/kotlin/crackers/kobots/parts/movement/RotatorTest.kt index 054ad0f..5c04356 100644 --- a/src/test/kotlin/crackers/kobots/parts/movement/RotatorTest.kt +++ b/src/test/kotlin/crackers/kobots/parts/movement/RotatorTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 by E. A. Graham, Jr. + * Copyright 2022-2024 by E. A. Graham, Jr. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/version.properties b/version.properties index 3a89746..e56139c 100644 --- a/version.properties +++ b/version.properties @@ -1,8 +1,8 @@ #Generated by the Semver Plugin for Gradle -#Tue May 21 12:31:05 PDT 2024 +#Fri Jun 14 15:29:24 PDT 2024 version.buildmeta= version.major=0 -version.minor=0 -version.patch=18 +version.minor=1 +version.patch=0 version.prerelease= -version.semver=0.0.18 +version.semver=0.1.0