Compare commits

..

10 Commits

Author SHA1 Message Date
Meydin87
ea3b0f29ea MeyCan V7 2024-09-05 06:54:12 +02:00
5fc9592886 added Fixed antibeat support 2023-10-28 11:39:03 +02:00
f842815435 Updates rules 2023-10-28 10:41:24 +02:00
Meydin87
c8ffe71fca Final SW Version 8 2023-07-30 17:07:49 +02:00
Meydin87
ad72be85b1 Software for V7 refactored 2023-07-18 07:31:20 +02:00
Meydin87
21fab157da WIP PinState from array to pointer 2023-07-18 06:39:39 +02:00
Meydin87
d8a9bb7610 added testcases / a bit refactored 2023-07-09 07:57:06 +02:00
Meydin87
58325fdd88 WIP / Refactored Switch Software 2023-07-08 13:08:06 +02:00
Meydin87
8141386359 try resend on errors 2023-06-04 12:00:19 +02:00
Meydin87
25865027f7 Added Jumper vor 5VLDO -> Better Deploy without fear to kill the ICs 2023-06-04 08:31:05 +02:00
96 changed files with 11904 additions and 194738 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,16 @@
{ {
"board": { "board": {
"active_layer": 37, "active_layer": 36,
"active_layer_preset": "Front Assembly View", "active_layer_preset": "",
"auto_track_width": true, "auto_track_width": false,
"hidden_nets": [], "hidden_nets": [],
"high_contrast_mode": 1, "high_contrast_mode": 0,
"net_color_mode": 1, "net_color_mode": 1,
"opacity": { "opacity": {
"pads": 1.0, "pads": 1.0,
"tracks": 1.0, "tracks": 1.0,
"vias": 1.0, "vias": 1.0,
"zones": 0.6 "zones": 1.0
}, },
"ratsnest_display_mode": 0, "ratsnest_display_mode": 0,
"selection_filter": { "selection_filter": {
@@ -18,7 +18,7 @@
"footprints": true, "footprints": true,
"graphics": true, "graphics": true,
"keepouts": true, "keepouts": true,
"lockedItems": true, "lockedItems": false,
"otherItems": true, "otherItems": true,
"pads": true, "pads": true,
"text": true, "text": true,
@@ -62,7 +62,7 @@
35, 35,
36 36
], ],
"visible_layers": "00290a0_00000000", "visible_layers": "0001030_ffffffff",
"zone_display_mode": 0 "zone_display_mode": 0
}, },
"meta": { "meta": {

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach) - openHAB",
"request": "attach",
"hostName": "localhost",
"port": 5005,
"preLaunchTask": "Build"
}
]
}

View File

@@ -0,0 +1,149 @@
{
"version": "2.0.0",
"options": {
"env": {
"openhab_home": "C://source//openhab_runtime",
"openhab_runtime": "C://source//openhab_runtime//runtime",
"openhab_addons": "C://source//openhab_runtime//addons",
"openhab_logs": "C://source//openhab_runtime//userdata/logs",
"dist" : "org.openhab.binding.meycan-4.0.0-SNAPSHOT.jar"
}
},
"tasks": [
{
"label": "Start openHAB (Debug)",
"type": "shell",
"isBackground": true,
"command": "$openhab_home/start.sh debug",
"windows": {
"command": "& $env:openhab_home/start.bat debug"
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Stop openHAB",
"type": "shell",
"command": "$openhab_runtime/bin/stop",
"windows": {
"command": "& $env:openhab_runtime/bin/stop.bat"
},
"problemMatcher": []
},
{
"label": "mvn Compile (Release)",
"type": "shell",
"command": "mvn",
"args": [
"clean",
"install"
],
"problemMatcher": []
},
{
"label": "mvn Compile (Online)",
"type": "shell",
"command": "mvn",
"args": [
"clean",
"install",
"-DskipChecks"
],
"problemMatcher": []
},
{
"label": "mvn Compile (Offline)",
"type": "shell",
"command": "mvn",
"args": [
"-o",
"clean",
"install",
"-DskipChecks"
],
"problemMatcher": []
},
{
"label": "Copy Distribution to Addons",
"type": "shell",
"command": "cp",
"args": [
"${workspaceFolder}/target/$dist",
"$openhab_addons"
],
"windows": {
"command": "copy",
"args": [
"${workspaceFolder}/target/$env:dist",
"$env:openhab_addons"
]
},
"dependsOn": [
"mvn Compile (Offline)"
],
"problemMatcher": []
},
{
"label": "Build",
"dependsOn": [
"Copy Distribution to Addons"
],
"problemMatcher": []
},
{
"label": "Tail events.log",
"type": "shell",
"command": "tail",
"args": [
"-n",
"50",
"-F",
"$openhab_logs/events.log"
],
"windows": {
"command": "Get-Content",
"args": [
"-Last",
"50",
"-Path",
"$env:openhab_logs/events.log",
"-Wait"
]
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Tail openhab.log",
"type": "shell",
"command": "tail",
"args": [
"-n",
"50",
"-F",
"$openhab_logs/openhab.log"
],
"windows": {
"command": "Get-Content",
"args": [
"-Last",
"50",
"-Path",
"$env:openhab_logs/openhab.log",
"-Wait"
]
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
}
]
}

View File

@@ -0,0 +1,13 @@
This content is produced and maintained by the openHAB project.
* Project home: https://www.openhab.org
== Declared Project Licenses
This program and the accompanying materials are made available under the terms
of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.
== Source Code
https://github.com/openhab/openhab-addons

View File

@@ -0,0 +1,94 @@
# MeyCan Binding
_Give some details about what this binding is meant for - a protocol, system, specific device._
_If possible, provide some resources like pictures (only PNG is supported currently), a video, etc. to give an impression of what can be done with this binding._
_You can place such resources into a `doc` folder next to this README.md._
_Put each sentence in a separate line to improve readability of diffs._
## Supported Things
_Please describe the different supported things / devices including their ThingTypeUID within this section._
_Which different types are supported, which models were tested etc.?_
_Note that it is planned to generate some part of this based on the XML files within ```src/main/resources/OH-INF/thing``` of your binding._
- `bridge`: Short description of the Bridge, if any
- `sample`: Short description of the Thing with the ThingTypeUID `sample`
## Discovery
_Describe the available auto-discovery features here._
_Mention for what it works and what needs to be kept in mind when using it._
## Binding Configuration
_If your binding requires or supports general configuration settings, please create a folder ```cfg``` and place the configuration file ```<bindingId>.cfg``` inside it._
_In this section, you should link to this file and provide some information about the options._
_The file could e.g. look like:_
```
# Configuration for the MeyCan Binding
#
# Default secret key for the pairing of the MeyCan Thing.
# It has to be between 10-40 (alphanumeric) characters.
# This may be changed by the user for security reasons.
secret=openHABSecret
```
_Note that it is planned to generate some part of this based on the information that is available within ```src/main/resources/OH-INF/binding``` of your binding._
_If your binding does not offer any generic configurations, you can remove this section completely._
## Thing Configuration
_Describe what is needed to manually configure a thing, either through the UI or via a thing-file._
_This should be mainly about its mandatory and optional configuration parameters._
_Note that it is planned to generate some part of this based on the XML files within ```src/main/resources/OH-INF/thing``` of your binding._
### `sample` Thing Configuration
| Name | Type | Description | Default | Required | Advanced |
|-----------------|---------|---------------------------------------|---------|----------|----------|
| hostname | text | Hostname or IP address of the device | N/A | yes | no |
| password | text | Password to access the device | N/A | yes | no |
| refreshInterval | integer | Interval the device is polled in sec. | 600 | no | yes |
## Channels
_Here you should provide information about available channel types, what their meaning is and how they can be used._
_Note that it is planned to generate some part of this based on the XML files within ```src/main/resources/OH-INF/thing``` of your binding._
| Channel | Type | Read/Write | Description |
|---------|--------|------------|-----------------------------|
| control | Switch | RW | This is the control channel |
## Full Example
_Provide a full usage example based on textual configuration files._
_*.things, *.items examples are mandatory as textual configuration is well used by many users._
_*.sitemap examples are optional._
### Thing Configuration
```java
Example thing configuration goes here.
```
### Item Configuration
```java
Example item configuration goes here.
```
### Sitemap Configuration
```perl
Optional Sitemap configuration goes here.
Remove this section, if not needed.
```
## Any custom content here!
_Feel free to add additional sections for whatever you think should also be mentioned about your binding!_

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>4.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.binding.meycan</artifactId>
<name>openHAB Add-ons :: Bundles :: MeyCan Binding</name>
</project>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.meycan-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
<feature name="openhab-binding-meycan" description="MeyCan Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.meycan/${project.version}</bundle>
</feature>
</features>

View File

@@ -0,0 +1,34 @@
/**
* Copyright (c) 2010-2023 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.meycan.internal;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.thing.ThingTypeUID;
/**
* The {@link MeyCanBindingConstants} class defines common constants, which are
* used across the whole binding.
*
* @author Martin Linkwitz - Initial contribution
*/
@NonNullByDefault
public class MeyCanBindingConstants {
private static final String BINDING_ID = "meycan";
// List of all Thing Type UIDs
public static final ThingTypeUID THING_TYPE_SAMPLE = new ThingTypeUID(BINDING_ID, "sample");
// List of all Channel ids
public static final String CHANNEL_1 = "channel1";
}

View File

@@ -0,0 +1,31 @@
/**
* Copyright (c) 2010-2023 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.meycan.internal;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* The {@link MeyCanConfiguration} class contains fields mapping thing configuration parameters.
*
* @author Martin Linkwitz - Initial contribution
*/
@NonNullByDefault
public class MeyCanConfiguration {
/**
* Sample configuration parameters. Replace with your own.
*/
public String hostname = "";
public String password = "";
public int refreshInterval = 600;
}

View File

@@ -0,0 +1,104 @@
/**
* Copyright (c) 2010-2023 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.meycan.internal;
import static org.openhab.binding.meycan.internal.MeyCanBindingConstants.*;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.core.thing.ChannelUID;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingStatus;
import org.openhab.core.thing.binding.BaseThingHandler;
import org.openhab.core.types.Command;
import org.openhab.core.types.RefreshType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The {@link MeyCanHandler} is responsible for handling commands, which are
* sent to one of the channels.
*
* @author Martin Linkwitz - Initial contribution
*/
@NonNullByDefault
public class MeyCanHandler extends BaseThingHandler {
private final Logger logger = LoggerFactory.getLogger(MeyCanHandler.class);
private @Nullable MeyCanConfiguration config;
public MeyCanHandler(Thing thing) {
super(thing);
}
@Override
public void handleCommand(ChannelUID channelUID, Command command) {
if (CHANNEL_1.equals(channelUID.getId())) {
if (command instanceof RefreshType) {
// TODO: handle data refresh
}
// TODO: handle command
// Note: if communication with thing fails for some reason,
// indicate that by setting the status with detail information:
// updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
// "Could not control device at IP address x.x.x.x");
}
}
@Override
public void initialize() {
config = getConfigAs(MeyCanConfiguration.class);
// TODO: Initialize the handler.
// The framework requires you to return from this method quickly, i.e. any network access must be done in
// the background initialization below.
// Also, before leaving this method a thing status from one of ONLINE, OFFLINE or UNKNOWN must be set. This
// might already be the real thing status in case you can decide it directly.
// In case you can not decide the thing status directly (e.g. for long running connection handshake using WAN
// access or similar) you should set status UNKNOWN here and then decide the real status asynchronously in the
// background.
// set the thing status to UNKNOWN temporarily and let the background task decide for the real status.
// the framework is then able to reuse the resources from the thing handler initialization.
// we set this upfront to reliably check status updates in unit tests.
updateStatus(ThingStatus.UNKNOWN);
// Example for background initialization:
scheduler.execute(() -> {
boolean thingReachable = true; // <background task with long running initialization here>
// when done do:
if (thingReachable) {
updateStatus(ThingStatus.ONLINE);
} else {
updateStatus(ThingStatus.OFFLINE);
}
});
// These logging types should be primarily used by bindings
// logger.trace("Example trace message");
// logger.debug("Example debug message");
// logger.warn("Example warn message");
//
// Logging to INFO should be avoided normally.
// See https://www.openhab.org/docs/developer/guidelines.html#f-logging
// Note: When initialization can NOT be done set the status with more details for further
// analysis. See also class ThingStatusDetail for all available status details.
// Add a description to give user information to understand why thing does not work as expected. E.g.
// updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
// "Can not access device as username and/or password are invalid");
}
}

View File

@@ -0,0 +1,55 @@
/**
* Copyright (c) 2010-2023 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.meycan.internal;
import static org.openhab.binding.meycan.internal.MeyCanBindingConstants.*;
import java.util.Set;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingTypeUID;
import org.openhab.core.thing.binding.BaseThingHandlerFactory;
import org.openhab.core.thing.binding.ThingHandler;
import org.openhab.core.thing.binding.ThingHandlerFactory;
import org.osgi.service.component.annotations.Component;
/**
* The {@link MeyCanHandlerFactory} is responsible for creating things and thing
* handlers.
*
* @author Martin Linkwitz - Initial contribution
*/
@NonNullByDefault
@Component(configurationPid = "binding.meycan", service = ThingHandlerFactory.class)
public class MeyCanHandlerFactory extends BaseThingHandlerFactory {
private static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_SAMPLE);
@Override
public boolean supportsThingType(ThingTypeUID thingTypeUID) {
return SUPPORTED_THING_TYPES_UIDS.contains(thingTypeUID);
}
@Override
protected @Nullable ThingHandler createHandler(Thing thing) {
ThingTypeUID thingTypeUID = thing.getThingTypeUID();
if (THING_TYPE_SAMPLE.equals(thingTypeUID)) {
return new MeyCanHandler(thing);
}
return null;
}
}

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon:addon id="meycan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">
<type>binding</type>
<name>MeyCan Binding</name>
<description>This is the binding for MeyCan.</description>
</addon:addon>

View File

@@ -0,0 +1,3 @@
# FIXME: please add all English translations to this file so the texts can be translated using Crowdin
# FIXME: to generate the content of this file run: mvn i18n:generate-default-translations
# FIXME: see also: https://www.openhab.org/docs/developer/utils/i18n.html

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="meycan"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<!-- Sample Thing Type -->
<thing-type id="sample">
<!-- Comment this in for Things which need a Bridge to function.
<supported-bridge-type-refs>
<bridge-type-ref id="MeyCanBridge" />
</supported-bridge-type-refs>
-->
<label>MeyCan Binding Thing</label>
<description>Sample thing for MeyCan Binding</description>
<channels>
<channel id="channel1" typeId="sample-channel"/>
</channels>
<config-description>
<parameter name="hostname" type="text" required="true">
<context>network-address</context>
<label>Hostname</label>
<description>Hostname or IP address of the device</description>
</parameter>
<parameter name="password" type="text" required="true">
<context>password</context>
<label>Password</label>
<description>Password to access the device</description>
</parameter>
<parameter name="refreshInterval" type="integer" unit="s" min="1">
<label>Refresh Interval</label>
<description>Interval the device is polled in sec.</description>
<default>600</default>
<advanced>true</advanced>
</parameter>
</config-description>
</thing-type>
<!-- Sample Channel Type -->
<channel-type id="sample-channel">
<item-type>Number:Temperature</item-type>
<label>Example Temperature</label><!-- Use uppercase words, except prepositions. 2-3 words, max 25 chars -->
<description>Sample channel for MeyCan Binding</description>
</channel-type>
</thing:thing-descriptions>

View File

@@ -15,9 +15,9 @@ Packages
--------------------------------- ---------------------------------
0xF00: HELLO->ADOPT 0xF00: HELLO->ADOPT
Payload: Payload:
2 bytes | DeviceId -> DeviceId Explicit
2 bytes | Byte -> Software-Version (1.0) 2 bytes | Byte -> Software-Version (1.0)
2 bytes | Byte -> Hw Version (4.0 2 bytes | Byte -> Hw Version (4.0)
2 bytes | DeviceId -> DeviceId Explicit
0x050: Input Switch Triggered 0x050: Input Switch Triggered
-> Broadcast -> Broadcast
@@ -29,7 +29,7 @@ Payload:
0x055: Command Set Switch 0x055: Command Set Switch
-> Broadcast -> Broadcast
--------------------------------- ---------------------------------
2 bytes | TargetDeviceId -> The id of the board 2 bytes | TargetDeviceId -> The id of the device to set the pin of
1 byte | PinId -> Idof the pin of the board 1 byte | PinId -> Idof the pin of the board
1 byte | state -> 1 to swtich on, 0 to switch off 1 byte | state -> 1 to swtich on, 0 to switch off

View File

@@ -1,5 +1,7 @@
{ {
"configuration": "pinout=48pin_standard,eeprom=keep,resetpin=reset,BOD=2v6,clock=internal_8MHz,bootloader=no_bootloader", "configuration": "pinout=48pin_standard,eeprom=keep,resetpin=reset,BOD=2v6,clock=internal_8MHz,bootloader=no_bootloader",
"board": "MegaCoreX:megaavr:809", "board": "MegaCoreX:megaavr:809",
"sketch": "Swtich.ino" "sketch": "Switch.ino",
"port": "COM6",
"programmer": "jtag2updi"
} }

View File

@@ -32,7 +32,7 @@
"cppStandard": "c++17", "cppStandard": "c++17",
"defines": [ "defines": [
"F_CPU=8000000L", "F_CPU=8000000L",
"ARDUINO=10819", "ARDUINO=10607",
"ARDUINO_AVR_ATmega809", "ARDUINO_AVR_ATmega809",
"ARDUINO_ARCH_MEGAAVR", "ARDUINO_ARCH_MEGAAVR",
"__DBL_MIN_EXP__=(-125)", "__DBL_MIN_EXP__=(-125)",

255
Software/Switch/MeyCan.cpp Normal file
View File

@@ -0,0 +1,255 @@
#include "MeyCan.h";
#include <SPI.h>;
#include <mcp2515.h>;
PinState *MeyPin = NULL;
CanInterface *CanBusses = NULL;
uint16_t myDeviceId;
byte _deviceTypeId = 0;
byte _majorHardwareVersion = 0;
byte _minorHardwareVersion = 0;
void SetupMeyPin(PinState *state)
{
pinMode(state->pin_id, OUTPUT);
digitalWrite(state->pin_id, LOW);
state->pin_state = false;
}
void InitCanInterface(MCP2515 *interface, can_frame *frame) // can_frame is NULL. Reuse ForEach Method for smaller footprint
{
interface->reset();
interface->setBitrate(CAN_500KBPS, MCP_8MHZ); //Sets CAN at speed 500KBPS and Clock 8MHz
interface->setNormalMode();
SendVersionPackage(interface);
}
void ForEachCanInterface(void (*handle)(MCP2515 *canInterace))
{
CanBusses->ForEachInterface(handle);
}
void SetupMeyCan(byte majorHardwareVersion, byte minorHardwareVersion, byte deviceTypeId)
{
_majorHardwareVersion = majorHardwareVersion;
_minorHardwareVersion = minorHardwareVersion;
_deviceTypeId = deviceTypeId;
CalculateMyDeviceId();
if (MeyPin != NULL);
MeyPin->ForEach(SetupMeyPin);
if (CanBusses != NULL)
{
CanBusses->ForEach(InitCanInterface, NULL);
}
}
void AddCanInterface(byte pinId)
{
MCP2515* newCanInterface = new MCP2515(pinId);
CanInterface* canInterface = new CanInterface();
canInterface->interface = newCanInterface;
if (CanBusses == NULL)
CanBusses = canInterface;
else
CanBusses->AddCanInterface(canInterface);
}
void SetMeyPin(byte index, byte meyPinId, byte pinId)
{
PinState* newState = new PinState();
newState->Init(pinId, (byte) meyPinId);
if (MeyPin == NULL)
MeyPin = newState;
else
MeyPin->AddPinState(newState);
}
bool CheckPinStatus(PinState * state)
{
if (!state->is_input)
return false;
bool newValue = ReadPin(state);
if (newValue != state->pin_state)
{
delay(10);
newValue = ReadPin(state);
if (newValue != state->pin_state)
{
state->pin_state = newValue;
SendSwitchedTriggeredCanPackage(state->meyPinId, state->pin_state);
}
}
return false;
}
void CheckMeyPinsTriggered()
{
MeyPin->ForEach(CheckPinStatus);
}
bool ReadPin(PinState * state)
{
if (state->pin_id == PIN_PD2)
return digitalReadFast(PIN_PD2);
else if (state->pin_id == PIN_PC7)
return digitalReadFast(PIN_PC7);
else if (state->pin_id == PIN_PD1)
return digitalReadFast(PIN_PD1);
else if (state->pin_id == PIN_PD0)
return digitalReadFast(PIN_PD0);
else if (state->pin_id == PIN_PD6)
return digitalReadFast(PIN_PD6);
else if (state->pin_id == PIN_PD5)
return digitalReadFast(PIN_PD5);
else if (state->pin_id == PIN_PD4)
return digitalReadFast(PIN_PD4);
else if (state->pin_id == PIN_PD3)
return digitalReadFast(PIN_PD3);
else
return digitalRead(state->pin_id);
}
void HandleFrame(can_frame *frame, MCP2515 *source)
{
CanBusses->ForEach(DoSendCanPkg, frame, source);
HandleTriggerMeypinCanPackage(frame);
}
void HandleTriggerMeypinCanPackage(can_frame *frame)
{
if (GetPackageType(frame->can_id) == TRIGGER_SWITCH_CAN_ID)
{
uint16_t adressedDeviceId = ((uint16_t )frame->data[0] << 8) | frame->data[1] ;
if (adressedDeviceId != myDeviceId) return;
byte meyPinId = frame->data[2];
bool state = frame->data[3] > 0;
PinState *adressedPin = MeyPin->Find(meyPinId);
if (adressedPin != NULL)
{
if (adressedPin->is_input == true)
{
pinMode(adressedPin->pin_id, OUTPUT);
adressedPin->is_input = false;
}
bool pinChanged = adressedPin->pin_state != state;
adressedPin->pin_state = state;
if (pinChanged) {
digitalWrite(adressedPin->pin_id, state);
SendSwitchedTriggeredCanPackage(adressedPin->meyPinId, state);
}
}
}
}
byte CircularShift(byte b)
{
return (b << 1) | (b >> 7 & 1);
}
uint16_t GetDeviceId(uint32_t canFrameId)
{
return canFrameId & 0xFFFF;
}
uint16_t GetPackageType(uint32_t canFrameId)
{
return (canFrameId / 0x10000) & 0xFFF;
}
byte GetDeviceIdLow() {
return (SIGROW.SERNUM0 ^
CircularShift(SIGROW.SERNUM2) << 1 ^
CircularShift( CircularShift(SIGROW.SERNUM4)) ^
CircularShift( CircularShift( CircularShift(SIGROW.SERNUM6))) ^
CircularShift( CircularShift( CircularShift( CircularShift(SIGROW.SERNUM8)))));
}
byte GetDeviceIdHigh() {
return (SIGROW.SERNUM1 ^
CircularShift(SIGROW.SERNUM3) << 1 ^
CircularShift( CircularShift(SIGROW.SERNUM5)) ^
CircularShift( CircularShift( CircularShift(SIGROW.SERNUM7))) ^
CircularShift( CircularShift( CircularShift( CircularShift(SIGROW.SERNUM9)))));
}
uint32_t CreateCanId(uint16_t commandId)
{
return ((((uint32_t)commandId) & 0xFFF) * 0x10000) | myDeviceId | CAN_EFF_FLAG;
}
void SendVersionPackage(MCP2515 *interface)
{
can_frame toSend;
toSend.can_id = CreateCanId(HELP_PACKAGE_CAN_ID);
toSend.can_dlc = 5;
toSend.data[0] = SOFTWARE_VERSION_HIGH;
toSend.data[1] = SOFTWARE_VERSION_LOW;
toSend.data[2] = _majorHardwareVersion;
toSend.data[3] = _minorHardwareVersion;
toSend.data[4] = _deviceTypeId;
DoSendCanPkg(interface, &toSend);
}
void BroadcastTriggerMeyPinCanPackage(uint16_t targetCanId, byte pinId, byte state)
{
can_frame toSend;
toSend.can_id = CreateCanId(TRIGGER_SWITCH_CAN_ID);
toSend.can_dlc = 4;
toSend.data[0] = (targetCanId & 0xFF00) >> 8;
toSend.data[1] = targetCanId & 0xFF;
toSend.data[2] = pinId;
toSend.data[3] = state;
HandleFrame(&toSend, NULL);
}
void SendSwitchedTriggeredCanPackage(byte pinId, int state)
{
can_frame toSend;
toSend.can_id = CreateCanId(SWITCH_TRIGGERED_CAN_ID);
toSend.can_dlc = 2;
toSend.data[0] = pinId;
toSend.data[1] = state;
DoSendCanPkg(&toSend);
}
void DoSendCanPkg(can_frame *frame)
{
if (CanBusses != NULL)
CanBusses->ForEach(DoSendCanPkg, frame);
}
void DoSendCanPkg(MCP2515 *interface, can_frame *frame)
{
byte cnt = 0;
while (interface->sendMessage(frame))
{
if (++cnt > 10) return;
}
}
void CalculateMyDeviceId()
{
myDeviceId = (GetDeviceIdHigh() << 8) | GetDeviceIdLow();
}

128
Software/Switch/MeyCan.h Normal file
View File

@@ -0,0 +1,128 @@
#ifndef MEYCAN_H
#define MEYCAN_H
#include <SPI.h>
#include <mcp2515.h>
typedef struct CanInterface
{
MCP2515 *interface;
CanInterface *next = NULL;
void ForEachInterface(void (*handle)( MCP2515 *interface))
{
if (this->interface != NULL)
handle(this->interface);
if (this->next != NULL)
this->next->ForEachInterface(handle);
}
void ForEach(void (*handle)( MCP2515 *interface, can_frame *frame), can_frame *frame, MCP2515* exclude = NULL)
{
if (this->interface != NULL && this->interface != exclude)
handle(this->interface, frame);
if (this->next != NULL)
this->next->ForEach(handle, frame, exclude);
}
void AddCanInterface(CanInterface *newCanInterface)
{
if (next == NULL)
{
this->next = newCanInterface;
newCanInterface->next = NULL;
} else {
next->AddCanInterface(newCanInterface);
}
}
};
typedef struct PinState
{
int pin_id;
bool pin_state;
bool is_input;
byte meyPinId;
PinState *next = NULL;
PinState() {}
void Init(int pin_id, byte meyPinId)
{
this->pin_id = pin_id;
this->pin_state = true;
this->is_input = true;
this->meyPinId = meyPinId;
}
void AddPinState(PinState *nextPinState)
{
if (next == NULL)
{
this->next = nextPinState;
nextPinState->next = NULL;
} else {
next->AddPinState(nextPinState);
}
}
PinState* Find(byte meyPinId)
{
if (this->meyPinId == meyPinId)
return this;
if (this->next != NULL)
return this->next->Find(meyPinId);
return NULL;
}
void ForEach(void (*handle)(PinState *theState))
{
handle(this);
if (this->next != NULL)
this->next->ForEach(handle);
}
};
const byte SOFTWARE_VERSION_HIGH = 5;
const byte SOFTWARE_VERSION_LOW = 0;
const byte HARDWARE_VERSION_HIGH = 7;
const byte HARDWARE_VERSION_LOW = 0;
const uint16_t HELP_PACKAGE_CAN_ID = 0x0FFFUL;
const uint16_t SWITCH_TRIGGERED_CAN_ID = 0x0050;
const uint16_t TRIGGER_SWITCH_CAN_ID = 0x0055;
void AddCanInterface(byte pinId);
void SetMeyPin(byte index, byte meyPinId, byte pinId);
void SetupMeyCan(byte majorHardwareVersion, byte minorHardwareVersion, byte deviceTypeId);
void ForEachCanInterface(void (*handle)(MCP2515 *canInterace));
bool ReadPin(PinState *state);
bool CheckPinStatus(PinState * state);
void CheckMeyPinsTriggered(); /* checks weather a meypin triggered and sends a can pkg is neccessary */
void HandleFrame(can_frame *frame, MCP2515 *source);
void HandleTriggerMeypinCanPackage(can_frame *frame);
byte CircularShift(byte b);
uint16_t GetDeviceId(uint32_t canFrameId);
uint16_t GetPackageType(uint32_t canFrameId);
byte GetDeviceIdLow();
byte GetDeviceIdHigh();
uint32_t CreateCanId(uint16_t commandId);
void SendVersionPackage(MCP2515 *interface);
void SendSwitchedTriggeredCanPackage(byte pinId, int state);
void BroadcastTriggerMeyPinCanPackage(uint16_t targetCanId, byte pinId, byte state);
void DoSendCanPkg(can_frame *frame);
void DoSendCanPkg(MCP2515 *interface, can_frame *frame);
void CalculateMyDeviceId();
#endif

114
Software/Switch/MeyRule.cpp Normal file
View File

@@ -0,0 +1,114 @@
#include "MeyRule.h"
#include "MeyCan.h"
#include <Arduino.h>
#include <mcp2515.h>;
RemotePinInfo remotePinInfo = RemotePinInfo();
Rule *rules = NULL;
void PutRule(Rule *rule)
{
if (rules == NULL)
rules = rule;
else
rules->AddRule(rule);
}
void AddSimple(uint16_t sourceDevId, byte sourceMeyPinId, uint16_t targetDevId, byte targetMeyPinId)
{
Rule *rule = new Rule();
rule->sourceDevId = sourceDevId;
rule->sourceMeyPinId = sourceMeyPinId;
rule->targetDevId = targetDevId;
rule->targetMeyPinId = targetMeyPinId;
rule->toggle = false;
rule->inverse = false;
rule->lastPinState = false;
PutRule(rule);
}
void AddToggle(uint16_t sourceDevId, byte sourceMeyPinId, uint16_t targetDevId, byte targetMeyPinId)
{
Rule *rule = new Rule();
rule->sourceDevId = sourceDevId;
rule->sourceMeyPinId = sourceMeyPinId;
rule->targetDevId = targetDevId;
rule->targetMeyPinId = targetMeyPinId;
rule->toggle = true;
rule->inverse = false;
rule->lastPinState = false;
PutRule(rule);
}
void AddToggleInverse(uint16_t sourceDevId, byte sourceMeyPinId, uint16_t targetDevId, byte targetMeyPinId)
{
Rule *rule = new Rule();
rule->sourceDevId = sourceDevId;
rule->sourceMeyPinId = sourceMeyPinId;
rule->targetDevId = targetDevId;
rule->targetMeyPinId = targetMeyPinId;
rule->toggle = true;
rule->inverse = true;
rule->lastPinState = false;
PutRule(rule);
}
void CheckRule(uint16_t deviceId, uint8_t dt, uint8_t state, Rule *rule)
{
RemotePinInfo *currentRemotePinInfo = remotePinInfo.FindOrAdd(rule->targetDevId);
if (currentRemotePinInfo == NULL) return;
// check the new state with the last one. Needs to be done, as the UP switch might
// send it multiple times like "01 01" "01 01" for a single tip.(antibeat)
bool lastPinState = rule->lastPinState;
bool pinState = dt > 0;
if (rule->triggeredOnce && lastPinState == pinState) return;
rule->lastPinState = pinState;
rule->triggeredOnce = true;
if (rule->inverse)
pinState = !pinState;
if (rule->toggle)
pinState = (currentRemotePinInfo->getPinState(rule->targetMeyPinId) ^ true);
BroadcastTriggerMeyPinCanPackage(rule->targetDevId, rule->targetMeyPinId, pinState);
currentRemotePinInfo->setPinState(rule->targetMeyPinId, pinState);
}
void HandleTriggered(can_frame *frame)
{
if (GetPackageType(frame->can_id) == SWITCH_TRIGGERED_CAN_ID)
{
RemotePinInfo *currentPinState = remotePinInfo.FindOrAdd(GetDeviceId(frame->can_id) );
if (currentPinState == NULL)
return;
currentPinState->setPinState(frame->data[0], frame->data[1]);
}
}
void HandleRules(can_frame *frame)
{
HandleTriggered(frame);
if (rules == NULL) return;
if (GetPackageType(frame->can_id) == SWITCH_TRIGGERED_CAN_ID)
{
uint16_t deviceId = GetDeviceId(frame->can_id);
uint8_t dt = frame->data[1];
uint8_t state = frame->data[0];
rules->Traverse(deviceId, dt, state, CheckRule);
}
}

113
Software/Switch/MeyRule.h Normal file
View File

@@ -0,0 +1,113 @@
#ifndef MEYRULE_H
#define MEYRULE_H
#include <Arduino.h>
#include <mcp2515.h>;
struct Rule
{
uint16_t sourceDevId;
byte sourceMeyPinId;
uint16_t targetDevId;
byte targetMeyPinId;
bool toggle;
bool inverse;
Rule *nextRule = NULL;
bool lastPinState = false;
bool triggeredOnce = false;
void AddRule(Rule *rule)
{
if (this->nextRule == NULL)
{
this->nextRule = rule;
rule->nextRule = NULL;
} else {
this->nextRule->AddRule(rule);
}
}
void Traverse( uint16_t deviceId, uint8_t dt, uint8_t state, void (*handle)(uint16_t, uint8_t, uint8_t, Rule*))
{
if ( this->sourceDevId == deviceId && this->sourceMeyPinId == state)
handle(deviceId, dt, state, this);
if (this->nextRule != NULL)
this->nextRule->Traverse(deviceId, dt, state, handle);
}
};
typedef struct RemotePinInfo
{
const byte MAX_REMOTE_PIN_COUNT = 64;
uint16_t DeviceId = 0; // the id of the device
uint8_t pinState = 0; // bitmap of 8 MeyPin states of the device. 0000 0100, MeyPin #3 is HIGH in this example
RemotePinInfo *next = NULL;
bool getPinState(byte meyPin)
{
return (this->pinState >> (meyPin - 1)) & 1;
}
void setPinState(byte meyPin, bool state)
{
if (state)
this->pinState = this->pinState | (1 << (meyPin - 1)); // 0001 0000
else
this->pinState = this->pinState & (~(1 << (meyPin - 1))); // 1110 1111 -> not
}
int16_t Count()
{
if (this->next == NULL) return 1;
return this->next->Count() + 1;
}
RemotePinInfo* FindOrAdd(uint16_t deviceId, byte count = 0)
{
if (count > MAX_REMOTE_PIN_COUNT)
return NULL;
if (this->DeviceId == 0 && this->pinState == 0)
{
this->DeviceId = deviceId;
this->pinState = 0;
}
if (this->DeviceId == deviceId)
{
//ToggleDebug();
return this;
}
if (next != NULL)
{
return next->FindOrAdd(deviceId, count + 1);
}
RemotePinInfo *theNext = new RemotePinInfo;
theNext->DeviceId = deviceId;
theNext->pinState = 0;
theNext->next = NULL;
this->next = theNext;
return this->next;
}
};
extern RemotePinInfo remotePinInfo;
extern Rule *rules;
void AddSimple(uint16_t sourceDevId, byte sourceMeyPinId, uint16_t targetDevId, byte targetMeyPinId);
void AddToggle(uint16_t sourceDevId, byte sourceMeyPinId, uint16_t targetDevId, byte targetMeyPinId);
void AddToggleInverse(uint16_t sourceDevId, byte sourceMeyPinId, uint16_t targetDevId, byte targetMeyPinId);
void HandleRules(can_frame *frame);
void PutRule(Rule *rule);
void CheckRule(uint16_t deviceId, uint8_t dt, uint8_t state, Rule *rule);
#endif

View File

@@ -0,0 +1,96 @@
#include <SPI.h>;
#include <mcp2515.h>;
#include "MeyCan.h";
#include "MeyRule.h";
const int16_t SW_FLUR = 0XD238;
const int16_t SW_ANBAU = 0x87A9;
const int16_t SW_WOHNZIMMER = 0x87CA;
const int16_t UP_WOHNZIMMER_TUER = 0x051F;
const int16_t UP_WOHNZIMMER_TERASSE = 0x05df;
const int16_t UP_FLUR_EINGANG = 0x0769;
const int16_t UP_BUERO = 0x1177;
const int16_t UP_FLUR_BUERO = 0x05A1;
const int16_t UP_FLUR_KUECHE = 0x01EF;
const int16_t UP_KINDERZIMMER = 0x0196;
const int16_t UP_FLUR_ELTERN = 0x0632;
const int16_t UP_KUECHE_FLUR = 0x07F5;
const int16_t UP_KUECHE_BAD = 0x0585;
struct can_frame incomingCanFrame;
void setup() {
SPI.begin();
// AddToggleInverse(UP_WOHNZIMMER_TUER, 5, SW_WOHNZIMMER, 4); // Lichtschalter Wohnzimmer Licht 1
// AddToggleInverse(UP_WOHNZIMMER_TUER, 5, SW_WOHNZIMMER, 3); // Lichtschalter Wohnzimmer Licht 2
// AddToggle(UP_WOHNZIMMER_TERASSE, 1, SW_WOHNZIMMER, 4); // Licht 1 von Terassenschalter
// AddToggle(UP_WOHNZIMMER_TERASSE, 1, SW_WOHNZIMMER, 3); // Licht 2 von Terassenschalter
//
// AddToggle(0x0769, 1, SW_WOHNZIMMER, 7); // Eingangstür Flur Licht 2
// AddToggle(0x0769, 1, SW_FLUR, 1); //Eingangstür Flur Licht 1
//
// AddToggle(UP_WOHNZIMMER_TUER, 3, SW_WOHNZIMMER, 1); // Licht 1 Wochzimmer Eingangstür
// AddToggle(UP_WOHNZIMMER_TUER, 4, SW_WOHNZIMMER, 2); // Licht 2 Wochzimmer Eingangstür
//
// AddToggle(0x1177, 1, SW_WOHNZIMMER, 6); // Licht Papa Büro
// AddToggle(0x05A1, 1, SW_WOHNZIMMER, 7); // Flurlicht von Papas Büro
// AddToggle(0x05A1, 1, SW_FLUR, 1); // Flurlicht von Papas Büro
// AddToggle(0x01EF, 1, SW_WOHNZIMMER, 7); // Flurlicht von Papas Büro
// AddToggle(0x01EF, 1, SW_FLUR, 1); // Flurlicht von Papas Büro
// AddToggle(0x0196, 3, SW_WOHNZIMMER, 7); // Flurlicht von Papas Büro
// AddToggle(0x0196, 3, SW_FLUR, 1); // Flurlicht von Papas Büro
// AddToggle(0x0632, 1, SW_FLUR, 5); // Flurlicht von Papas Büro
//
// AddToggle(UP_WOHNZIMMER_TUER, 2, SW_FLUR, 2); // Linus Zimmer hoch aus Wohnzimmer
// AddToggle(UP_WOHNZIMMER_TUER, 1, SW_FLUR, 3); // Linus Zimmer runter hoch aus Wohnzimmer
//
// AddToggle(0x0769, 2, SW_FLUR, 4); // Linus Zimmer runter hoch aus Wohnzimmer
//
//
// AddToggle(UP_KUECHE_FLUR, 1, SW_ANBAU, 2);
// AddToggle(UP_KUECHE_FLUR, 2, SW_ANBAU, 3);
// AddToggle(UP_KUECHE_BAD, 1, SW_ANBAU, 2);
// AddToggle(UP_KUECHE_BAD, 3, SW_ANBAU, 1);
// AddToggle(UP_KUECHE_BAD, 2, SW_ANBAU, 4);
_PROTECTED_WRITE(CLKCTRL.MCLKCTRLA, CLKCTRL.MCLKCTRLA | 1 << 7);
delay(10); // a bit delay for mcp2515 to get the clock
SetMeyPin(0, 1, PIN_PC7);
SetMeyPin(1, 2, PIN_PC6);
SetMeyPin(2, 3, PIN_PC5);
SetMeyPin(3, 4, PIN_PC4);
SetMeyPin(4, 5, PIN_PC3);
SetMeyPin(5, 6, PIN_PC2);
SetMeyPin(6, 7, PIN_PC1);
SetMeyPin(7, 8, PIN_PC0);
AddCanInterface(PIN_PA2);
AddCanInterface(PIN_PA3);
AddCanInterface(PIN_PB0);
AddCanInterface(PIN_PB1);
SetupMeyCan(7, 0, 1);
}
void loop()
{
ForEachCanInterface(CheckCanInterface);
}
void CheckCanInterface(MCP2515 *interface)
{
if (interface->readMessage(&incomingCanFrame) == MCP2515::ERROR_OK)
{
HandleFrame(&incomingCanFrame, interface);
HandleRules(&incomingCanFrame);
}
}

View File

@@ -1,514 +0,0 @@
#include <SPI.h>;
#include <mcp2515.h>;
const byte SoftwareVersionHigh = 3;
const byte SoftwareVersionLow = 0;
const byte HardwareVersionHigh = 6;
const byte HardwareVersionLow = 0;
const uint32_t HELP_PACKAGE_CAN_ID = 0xFFFF;
const uint32_t SWITCH_TRIGGERED_CAN_ID = 0x050;
const uint32_t TRIGGER_SWITCH_CAN_ID = 0x055;
const uint32_t DEBUG_CAN_ID = 0x000;
struct can_frame _frame;
typedef struct
{
uint32_t sourceDevId;
byte sourceMeyPinId;
uint32_t targetDevId;
byte targetMeyPinId;
bool toggle;
bool inverse;
void InitSimple(uint32_t sourceDevId, byte sourceMeyPinId, uint32_t targetDevId, byte targetMeyPinId)
{
this->sourceDevId = sourceDevId;
this->sourceMeyPinId = sourceMeyPinId;
this->targetDevId = targetDevId;
this->targetMeyPinId = targetMeyPinId;
toggle = false;
inverse = false;
}
void InitToggle(uint32_t sourceDevId, byte sourceMeyPinId, uint32_t targetDevId, byte targetMeyPinId)
{
this->sourceDevId = sourceDevId;
this->sourceMeyPinId = sourceMeyPinId;
this->targetDevId = targetDevId;
this->targetMeyPinId = targetMeyPinId;
toggle = true;
inverse = false;
}
void InitToggleInverse(uint32_t sourceDevId, byte sourceMeyPinId, uint32_t targetDevId, byte targetMeyPinId)
{
this->sourceDevId = sourceDevId;
this->sourceMeyPinId = sourceMeyPinId;
this->targetDevId = targetDevId;
this->targetMeyPinId = targetMeyPinId;
toggle = true;
inverse = true;
}
} Rule;
typedef struct
{
int pin_id;
bool pin_state;
bool is_input;
byte meyPinId;
PinState() {}
void Init(int pin_id, byte meyPinId)
{
this->pin_id = pin_id;
this->pin_state = true;
this->is_input = true;
this->meyPinId = meyPinId;
}
} PinState;
struct RemotePinInfo
{
const byte MAX_REMOTE_PIN_COUNT = 50;
uint16_t DeviceId = 0; // the id of the device
uint16_t pinState = 0; // bitmap of 8 MeyPin states of the device. 0000 0100, MeyPin #3 is HIGH in this example
RemotePinInfo *next = NULL;
bool getPinState(byte meyPin)
{
return (this->pinState >> (meyPin - 1)) & 1;
}
void setPinState(byte meyPin, bool state)
{
if (state)
this->pinState = this->pinState | (1 << (meyPin - 1)); // 0001 0000
else
this->pinState = this->pinState & (~(1 << (meyPin - 1))); // 1110 1111 -> not
}
int16_t Count()
{
if (this->next == NULL) return 1;
return this->next->Count() + 1;
}
RemotePinInfo* FindOrAdd(uint16_t deviceId, byte count = 0)
{
if (count > MAX_REMOTE_PIN_COUNT)
return NULL;
if (this->DeviceId == 0 && this->pinState == 0)
{
this->DeviceId = deviceId;
this->pinState = 0;
}
if (this->DeviceId == deviceId)
{
//ToggleDebug();
return this;
}
if (next != NULL)
{
return next->FindOrAdd(deviceId, count + 1);
}
RemotePinInfo *theNext = new RemotePinInfo;
theNext->DeviceId = deviceId;
theNext->pinState = 0;
theNext->next = NULL;
this->next = theNext;
return this->next;
}
};
struct RemotePinInfo remotePinInfos = RemotePinInfo();
PinState MeyPins[8];
bool flag = false;
int16_t myDeviceId;
Rule Rules[16];
MCP2515 mcp2515_0(PIN_PA2);
MCP2515 mcp2515_1(PIN_PA3);
MCP2515 mcp2515_2(PIN_PB0);
MCP2515 mcp2515_3(PIN_PB1);
void setup() {
SPI.begin();
Rules[0] = Rule();
Rules[0].InitToggleInverse(0x051F, 5, 0x3D2D, 4); // Lichtschalter Wohnzimmer Licht 1
Rules[1] = Rule();
Rules[1].InitToggleInverse(0x051F, 5, 0x3D2D, 3); // Lichtschalter Wohnzimmer Licht 2
Rules[2] = Rule();
Rules[2].InitToggle(0x05df, 1, 0x3D2D, 4); // Licht 1 von Terassenschalter
Rules[3] = Rule();
Rules[3].InitToggle(0x05df, 1, 0x3D2D, 3); // Licht 2 von Terassenschalter
Rules[4] = Rule();
Rules[4].InitToggle(0x0769, 1, 0x3D2D, 6); // Eingangstür Flur Licht 2
Rules[5] = Rule();
Rules[5].InitToggle(0x0769, 1, 0x9829, 1); //Eingangstür Flur Licht 1
Rules[6] = Rule();
Rules[6].InitSimple(0x051F, 3,0x3D2D, 1); // Licht 1 Wochzimmer Eingangstür
Rules[7] = Rule();
Rules[7].InitSimple(0x051F, 4,0x3D2D, 2); // Licht 2 Wochzimmer Eingangstür
Rules[8] = Rule();
Rules[8].InitToggle(0x1177, 1, 0x3D2D, 7); // Licht Papa Büro
Rules[9] = Rule();
Rules[9].InitToggle(0x05A1, 1,0x3D2D, 6); // Flurlicht von Papas Büro
Rules[10] = Rule();
Rules[10].InitToggle(0x05A1, 1,0x9829, 1); // Flurlicht von Papas Büro
Rules[11] = Rule();
Rules[11].InitToggle(0x01EF, 1,0x3D2D, 6); // Flurlicht von Papas Büro
Rules[12] = Rule();
Rules[12].InitToggle(0x01EF, 1,0x9829, 1); // Flurlicht von Papas Büro#
Rules[13] = Rule();
Rules[13].InitToggle(0x0196, 3,0x3D2D, 6); // Flurlicht von Papas Büro
Rules[14] = Rule();
Rules[14].InitToggle(0x0196, 3,0x9829, 1); // Flurlicht von Papas Büro
Rules[15] = Rule();
Rules[15].InitToggle(0x0632, 1, 0x9829, 5); // Flurlicht von Papas Büro
delay(10);
MeyPins[0] = PinState();
MeyPins[0].Init(PIN_PC7, (byte) 1);
MeyPins[1] = PinState();
MeyPins[1].Init(PIN_PC6, (byte) 2);
MeyPins[2] = PinState();
MeyPins[2].Init(PIN_PC5, (byte) 3);
MeyPins[3] = PinState();
MeyPins[3].Init(PIN_PC4, (byte) 4);
MeyPins[4] = PinState();
MeyPins[4].Init(PIN_PC3, (byte) 5);
MeyPins[5] = PinState();
MeyPins[5].Init(PIN_PC2, (byte) 6);
MeyPins[6] = PinState();
MeyPins[6].Init(PIN_PC1, (byte) 7);
MeyPins[7] = PinState();
MeyPins[7].Init(PIN_PC0, (byte) 8);
_PROTECTED_WRITE(CLKCTRL.MCLKCTRLA, CLKCTRL.MCLKCTRLA | 1 << 7);
mcp2515_0.reset();
mcp2515_0.setBitrate(CAN_500KBPS, MCP_8MHZ); //Sets CAN at speed 500KBPS and Clock 8MHz
mcp2515_0.setNormalMode();
mcp2515_1.reset();
mcp2515_1.setBitrate(CAN_500KBPS, MCP_8MHZ); //Sets CAN at speed 500KBPS and Clock 8MHz
mcp2515_1.setNormalMode();
mcp2515_2.reset();
mcp2515_2.setBitrate(CAN_500KBPS, MCP_8MHZ); //Sets CAN at speed 500KBPS and Clock 8MHz
mcp2515_2.setNormalMode();
mcp2515_3.reset();
mcp2515_3.setBitrate(CAN_500KBPS, MCP_8MHZ); //Sets CAN at speed 500KBPS and Clock 8MHz
mcp2515_3.setNormalMode();
for (int i = 0; i < sizeof(MeyPins) / sizeof(PinState); i++)
{
pinMode(MeyPins[i].pin_id, OUTPUT);
digitalWrite(MeyPins[i].pin_id, LOW);
}
CalculateMyDeviceId();
SendSerialPackage(&mcp2515_0);
SendSerialPackage(&mcp2515_1);
SendSerialPackage(&mcp2515_2);
SendSerialPackage(&mcp2515_3);
}
bool debugState = false;
void ToggleDebug()
{
debugState = debugState^true;
if (debugState)
digitalWrite(PIN_PC1, HIGH);
else
digitalWrite(PIN_PC1, LOW);
}
void loop()
{
if (mcp2515_0.readMessage(&_frame) == MCP2515::ERROR_OK)
{
mcp2515_1.sendMessage(MCP2515::TXB1, &_frame);
mcp2515_2.sendMessage(MCP2515::TXB1, &_frame);
mcp2515_3.sendMessage(MCP2515::TXB1, &_frame);
HandleFrame(&_frame);
}
if (mcp2515_1.readMessage(&_frame) == MCP2515::ERROR_OK)
{
mcp2515_0.sendMessage(MCP2515::TXB1, &_frame);
mcp2515_2.sendMessage(MCP2515::TXB1, &_frame);
mcp2515_3.sendMessage(MCP2515::TXB1, &_frame);
HandleFrame(&_frame);
}
if (mcp2515_2.readMessage(&_frame) == MCP2515::ERROR_OK)
{
mcp2515_0.sendMessage(MCP2515::TXB1, &_frame);
mcp2515_1.sendMessage(MCP2515::TXB1, &_frame);
mcp2515_3.sendMessage(MCP2515::TXB1, &_frame);
HandleFrame(&_frame);
}
if (mcp2515_3.readMessage(&_frame) == MCP2515::ERROR_OK)
{
mcp2515_0.sendMessage(MCP2515::TXB1, &_frame);
mcp2515_1.sendMessage(MCP2515::TXB1, &_frame);
mcp2515_2.sendMessage(MCP2515::TXB1, &_frame);
HandleFrame(&_frame);
}
}
void HandleFrame(can_frame *frame)
{
// ToggleDebug();
HandleMeyPinTriggeredCanPackage(frame);
HandleTriggerMeypinCanPackage(frame);
// Handle rules needs to be the last call
HandleRules(frame);
}
// this method will save the state of the triggered pin to be present for the rules
void HandleMeyPinTriggeredCanPackage(can_frame *frame)
{
if (GetPackageType(frame->can_id) == SWITCH_TRIGGERED_CAN_ID)
{
RemotePinInfo *currentPinState = remotePinInfos.FindOrAdd(GetDeviceId(frame->can_id) );
if (currentPinState == NULL)
{
int16_t test2[3];
test2[0] = 'S';
test2[1] = 'O';
test2[2] = 'S';
// SendDebugCanPackage(&mcp2515_3, test2, sizeof(test2) / sizeof(int16_t));
return;
}
int16_t test[1];
test[0] = remotePinInfos.Count();
// SendDebugCanPackage(&mcp2515_3, test, sizeof(test) / sizeof(int16_t));
currentPinState->setPinState(frame->data[0], frame->data[1]);
}
}
void HandleTriggerMeypinCanPackage(can_frame *frame)
{
if (GetPackageType(frame->can_id) == TRIGGER_SWITCH_CAN_ID && (GetDeviceId(frame->can_id) == GetMyDeviceId()))
{
int meyPinId = frame->data[2];
bool state = frame->data[3] > 0;
PinState *adressedPin;
for (int i = 0; i < sizeof(MeyPins) / sizeof(PinState); i++)
if (MeyPins[i].meyPinId == meyPinId)
{
adressedPin = &MeyPins[i];
break;
}
if (adressedPin != NULL)
{
if (adressedPin->is_input == true)
{
pinMode(adressedPin->pin_id, OUTPUT);
adressedPin->is_input = false;
}
adressedPin->pin_state = state;
digitalWrite(adressedPin->pin_id, state);
}
}
}
void HandleRules(can_frame *frame)
{
if (GetPackageType(frame->can_id) == SWITCH_TRIGGERED_CAN_ID)
{
uint16_t deviceId = GetDeviceId(frame->can_id);
uint8_t dt = _frame.data[1];
uint8_t state = frame->data[0];
for (int i = 0; i < sizeof(Rules) / sizeof(Rule); i++)
{
if ( Rules[i].sourceDevId == deviceId)
if (Rules[i].sourceMeyPinId == state)
HandleRule(&Rules[i], dt );
}
}
}
void HandleRule(Rule *rule, byte state)
{
struct RemotePinInfo *currentPinState = remotePinInfos.FindOrAdd(rule->targetDevId);
if (currentPinState == NULL)
{
return;
}
int pinState = state > 0;
if (rule->inverse)
pinState = !pinState;
if (rule->toggle)
{
pinState = (currentPinState->getPinState(rule->targetMeyPinId) ^ true) > 0;
}
SendDoTriggerSwitchCanPackage(&mcp2515_0, rule->targetDevId, rule->targetMeyPinId, pinState);
SendDoTriggerSwitchCanPackage(&mcp2515_1, rule->targetDevId, rule->targetMeyPinId, pinState);
SendDoTriggerSwitchCanPackage(&mcp2515_2, rule->targetDevId, rule->targetMeyPinId, pinState);
SendDoTriggerSwitchCanPackage(&mcp2515_3, rule->targetDevId, rule->targetMeyPinId, pinState);
//digitalWrite(foundPinId->pin_id, pinState);
//foundPinId->pin_state = pinState;
HandleFrame(&_frame);
currentPinState->setPinState(rule->targetMeyPinId, pinState);
}
byte CircularShift(byte b)
{
return (b << 1) | (b >> 7 & 1);
}
uint16_t GetDeviceId(uint32_t canFrameId)
{
return canFrameId & 0xFFFF;
}
uint32_t GetPackageType(uint32_t canFrameId)
{
return (canFrameId / 0x10000) & 0xFFF;
}
uint32_t CreateCanId(uint16_t commandId)
{
return ((commandId & 0xFFF) * 0x10000) | myDeviceId | CAN_EFF_FLAG;
}
uint32_t CreateCanId(uint16_t commandId, uint16_t deviceId)
{
return ((commandId & 0xFFF) * 0x10000) | deviceId | CAN_EFF_FLAG;
}
void CalculateMyDeviceId()
{
myDeviceId = (GetDeviceIdHigh() << 8) | GetDeviceIdLow();
}
uint16_t GetMyDeviceId()
{
return myDeviceId;
}
byte GetDeviceIdLow() {
return (SIGROW.SERNUM0 ^
CircularShift(SIGROW.SERNUM2) << 1 ^
CircularShift( CircularShift(SIGROW.SERNUM4)) ^
CircularShift( CircularShift( CircularShift(SIGROW.SERNUM6))) ^
CircularShift( CircularShift( CircularShift( CircularShift(SIGROW.SERNUM8)))));
}
byte GetDeviceIdHigh() {
return (SIGROW.SERNUM1 ^
CircularShift(SIGROW.SERNUM3) << 1 ^
CircularShift( CircularShift(SIGROW.SERNUM5)) ^
CircularShift( CircularShift( CircularShift(SIGROW.SERNUM7))) ^
CircularShift( CircularShift( CircularShift( CircularShift(SIGROW.SERNUM9)))));
}
void SendSerialPackage(MCP2515 *interface)
{
_frame.can_id = CreateCanId(HELP_PACKAGE_CAN_ID);
_frame.can_dlc = 4;
_frame.data[0] = SoftwareVersionHigh;
_frame.data[1] = SoftwareVersionLow;
_frame.data[2] = HardwareVersionHigh;
_frame.data[3] = HardwareVersionLow;
interface->sendMessage(MCP2515::TXB1, &_frame);
}
void SendSwitchedTriggeredCanPackage(MCP2515 *interface, byte pinId, int state)
{
_frame.can_id = CreateCanId(SWITCH_TRIGGERED_CAN_ID);
_frame.can_dlc = 2;
_frame.data[0] = pinId;
_frame.data[1] = state;
interface->sendMessage(MCP2515::TXB1, &_frame);
}
void SendDoTriggerSwitchCanPackage(MCP2515 *interface, uint16_t targetCanId, byte pinId, byte state)
{
_frame.can_id = CreateCanId(TRIGGER_SWITCH_CAN_ID, targetCanId);
_frame.can_dlc = 4;
_frame.data[0] = (targetCanId & 0xFF00) >> 8;
_frame.data[1] = targetCanId & 0xFF;
_frame.data[2] = pinId;
_frame.data[3] = state;
interface->sendMessage(MCP2515::TXB1, &_frame);
}
void SendDebugCanPackage(MCP2515 *interface, int16_t *data, int len)
{
can_frame frame = can_frame();
frame.can_id = 0;
frame.can_id = CreateCanId(DEBUG_CAN_ID);
frame.can_dlc = len * 2;
for (int i = 0; i < frame.can_dlc / 2; i++)
{
frame.data[2 * i] = ((byte[])data)[2 * i + 1];
frame.data[2 * i + 1] = ((byte[])data)[2 * i];
}
interface->sendMessage(MCP2515::TXB1, &frame);
}

View File

@@ -1,318 +0,0 @@
:1000000050C0000073C0000071C000006FC000004D
:100010006DC000006BC0000069C0000067C0000038
:1000200065C0000063C0000061C000005FC0000048
:100030005DC000005BC0000059C0000057C0000058
:1000400055C0000053C0000051C000004FC0000068
:100050004DC000004BC0000049C0000047C0000078
:1000600045C00000A8C6000041C000003FC000001D
:100070003DC000003BC0000039C0000037C0000098
:1000800035C0000033C0000031C000002FC00000A8
:100090002DC000002BC0000029C0000027C00000B8
:1000A000110711241FBECFEFCDBFDFE3DEBF1CE37E
:1000B000A0E0BCE3E0EBF3E102C005900D92AE30AE
:1000C000B107D9F72CE3AEE0BCE301C01D92A43721
:1000D000B207E1F710E0C1E5D0E003C02197FE01CF
:1000E000C9D7C035D107D1F7B6D604C989CF90E0BA
:1000F000FC01E957FC4A20812F3F51F0825A9C4A6B
:10010000DC01EC91B0E2EB9FF0011124FC5F218354
:10011000089580912D3C811117C010922E3C1092B1
:100120002F3C1092303C1092313C1092323C109295
:10013000333C1092343C1092353C1092363C109275
:10014000373C81E080932D3C8091E3058C7F90913A
:100150002C3C892B8093E305911117C084E0C7DF05
:1001600086E0C5DF8091C10884608093C1088091DA
:10017000C00881628093C0089091673C8091683C80
:100180009093C0088093C1080895913021F48EE0C7
:10019000AEDF80E1E6CF923029F78EE1A8DF80E282
:1001A000E0CF00008093C4088091C30887FFFCCF94
:1001B0008091C4080895282F30E0F901E957FC4ADE
:1001C00040814F3F09F450C0893258F4F901EC5F87
:1001D000FC4AE081EE2329F0E13099F010F0E6309E
:1001E00020F1F901E25AFC4AE081A0E2EA9FF00125
:1001F0001124FC5F8081842321F1611120C046839A
:100200000895F901EB5CFC4A5081533008F05F5FC0
:100210007091010A81E090E001C0880F5A95EAF7D9
:10022000809587238093010ADCCF80E1E89FF0016D
:100230001124E05AF54F81818F7E8183D2CF45838F
:1002400008952B5C3C4AD9018C91309771F08F3F17
:1002500061F07096E80FF11D9FB7F89480816111ED
:1002600007C0877F80839FBF0895F0E0E0E0F4CF70
:100270008860F8CF8FB7F8942091103C3091113CF2
:100280004091123C5091133CE091AA0AF091AB0AC4
:100290009091A60A90FF08C02F5F3F4F4F4F5F4FCE
:1002A000E091AA0AF091AB0A8FBFA8EEB3E0AFD6F7
:1002B00023E0F695E7952A95E1F76E0F7F1F811DE4
:1002C000911D0895CF92DF92EF92FF92D3DF6B01E1
:1002D0007C0120E1C20E27E2D21EE11CF11C80E16C
:1002E000C81687E2D806E104F10430F4C3DFC6166D
:1002F000D706E806F906D0F3BDDF6C157D058E053F
:100300009F05D0F3FF90EF90DF90CF9008958F92EC
:100310009F92AF92BF92CF92DF92EF92FF920F9394
:10032000CF93DF93FC018081893210F461E043DFD9
:1003300080912E3C882319F081FF0DC07894DF91C5
:10034000CF910F91FF90EF90DF90CF90BF90AF9043
:100350009F908F90089580FFF2CF8090303C9090D6
:10036000313CA090323CB090333CC12CD12C760172
:10037000E0E09401A501B601C701A0E06FD681F1CC
:10038000217030E040E050E060E070E080E090E01C
:1003900065D6D1F0B0E0A0E0E03370F4AE2FA695C2
:1003A000A695A695F0E2AF9FD0011124A05FBB4FA8
:1003B0008E2F8770A80FB11DCE2FD0E0C85DD34C13
:1003C00088899C91892B8C939401A501B601C70162
:1003D00001E029D649015A016B017C01EF5FC9CFC9
:1003E0008090343C9090353CA090363CB090373CA7
:1003F000C12CD12C7601E0E29401A501B601C70120
:10040000A0E02CD609F49BCF217030E040E050E012
:1004100060E070E080E090E021D6D1F0B0E0A0E0B4
:10042000E03370F4AE2FA695A695A69580E2A89F1E
:10043000D0011124A05FBB4F8E2F8770A80FB11D74
:10044000CE2FD0E0C85DD34C88899C91892B8C93AA
:100450009401A501B601C70101E0E5D549015A01A2
:100460006B017C01EF5FC8CFE0E0F1E14481968150
:10047000308522858485990F911D990F9427330F1C
:10048000311D330F311D9327229520FB279527F926
:100490009227829589270895E0E0F1E143819581D3
:1004A000378121858385990F911D990F9427330FEB
:1004B000311D330F311D9327229520FB279527F9F6
:1004C0009227829589270895CF92DF92EF92FF922B
:1004D000CF93DF9361E085E16EDEC090183CD09051
:1004E000193CE0901A3CF0901B3CC7019F7080358E
:1004F000910571F5A60180E0C0E0DCE398819817D2
:1005000038F129813A81232B31F42B813C81232B33
:1005100011F449835A8329813A8142175307F9F02C
:100520002D813E812115310519F08F5FE901E6CF5C
:1005300087E090E0B1D5FC0182E3808313821482CE
:1005400015821682C182D282ED83FE83309741F4F8
:10055000DF91CF91FF90EF90DF90CF900895FE0153
:10056000438154812091203C2150330B81E090E065
:1005700002C0880F991F2A95E2F72091213C22237F
:1005800029F0842B952B83839483E2CF80959095DB
:1005900084239523F8CF6F927F928F929F92AF9290
:1005A000BF92CF92DF92EF92FF920F93CF93DF93A0
:1005B0003C0180912E3C882319F081FF1BC0F894E8
:1005C00081E38093C00884E08093C108F3018081B7
:1005D000893208F09CC060E0DF91CF910F91FF90CD
:1005E000EF90DF90CF90BF90AF909F908F907F90D3
:1005F0006F90E1CD80FFE4CF8090303C9090313C13
:10060000A090323CB090333CC12CD12C7601B0E0AC
:100610009401A501B601C701A0E020D591F1217098
:1006200030E040E050E060E070E080E090E016D51F
:10063000E1F0D0E0C0E0B03370F4CB2FC695C695A2
:10064000C69580E2C89FE0011124C05FDB4F8B2F6D
:100650008770C80FD11D8B2F90E02881885D934C47
:10066000FC01208B8881887F88839401A501B601D5
:10067000C70101E0D8D449015A016B017C01BF5F79
:10068000C7CF8090343C9090353CA090363CB090E1
:10069000373CC12CD12C7601B0E29401A501B60102
:1006A000C701A0E0DBD409F48BCF217030E040E03B
:1006B00050E060E070E080E090E0D0D4E1F0D0E085
:1006C000C0E0B03370F4CB2FC695C695C695F0E266
:1006D000CF9FE0011124C05FDB4F8B2F8770C80FC5
:1006E000D11D8B2F90E02881885D934CFC01208BDD
:1006F0008881887F88839401A501B601C70101E044
:1007000092D449015A016B017C01BF5FC6CFDF91D2
:10071000CF910F91FF90EF90DF90CF90BF90AF906F
:100720009F908F907F906F900895FF920F931F93EB
:10073000CF93DF93EC01F62E042F122F2CDF85E0F0
:1007400030DD8F2D2EDD802F2CDD812F2ADDCE0197
:10075000DF91CF911F910F91FF90D9CDDF92EF9252
:10076000FF920F931F93CF93DF937C01C62FD42E5C
:10077000152F022F10DF82E014DD8C2F12DDCD2D1E
:10078000D12F0C0F1D2F111DC017D10719F0899102
:1007900008DDFACFC701DF91CF911F910F91FF9034
:1007A000EF90DF90B4CD0F931F93CF93DF93EC01C5
:1007B000062F142FF0DE82E0F4DC802FF2DC812F94
:1007C000F0DCCE01DF91CF911F910F91A0CDDF9290
:1007D000EF92FF920F931F93CF93DF937C01C62F6D
:1007E000D42E152F022FD7DE83E0DBDC8C2FD9DC53
:1007F000CD2DD12F0C0F1D2F111DC017D10721F0AA
:1008000080E0CFDC8993F9CFC701DF91CF911F91B1
:100810000F91FF90EF90DF907ACD1F93CF93DF93EE
:10082000EC01162FB8DE83E0BCDC812FBADC80E05F
:10083000B8DC182FCE016BDD812FDF91CF911F9196
:1008400008954F925F926F927F928F929F92AF9294
:10085000BF92CF92DF92EF92FF921F93CF93DF93DD
:10086000CDB7DEB72D97CDBFDEBF10911C3C193040
:1008700008F061C04091183C5091193C60911A3CBD
:1008800070911B3C6A017B01CC24F7FCC394DD24EE
:10089000EE24FF244A015B0188249924AA2420E441
:1008A000B22244244A94542C642CBFE17B2EC11004
:1008B00006C044244A94A7E05A2E612C712C44218E
:1008C000552166217721CC20C9F14C835B83AB0194
:1008D00066277727242F23702860342F330F330F98
:1008E000330F307E232B2A83F5E056954795FA95F2
:1008F000E1F74983212F89288A288B2809F0206471
:100900007C012D83412F50E060E27CE3CE0106960E
:10091000E8D425E0210FAE014F5F5F4F61E4C701CE
:100920001DDF28E048E060E4C701FFDE60E4C701A6
:1009300074DF807789F084E090E010C09A0153E082
:10094000369527955A95E1F729834295440F407EC5
:100950004A831C821B82CECF90E080E02D96CDBFD3
:10096000DEBFDF91CF911F91FF90EF90DF90CF908E
:10097000BF90AF909F908F907F906F905F904F90BF
:1009800008950F931F93CF93DF938C01C8E1DCE3AD
:100990008091143C9091153CB0E0A0E0AF6FBF682F
:1009A00088839983AA83BB8386E08C8393E09887AE
:1009B00019868A871B8658DD8C876EDD8D87C80176
:1009C000DF91CF911F910F913CCF9F92AF92BF9239
:1009D000CF92DF92EF92FF920F931F93CF93DF930B
:1009E000CDB7DEB72597CDBFDEBF5C018B01000F11
:1009F000111F000F111FF801E35DFC4A25E0AE0155
:100A00004F5F5F4F6181E3DE8A81C98098E0C99EB4
:100A100060011124282F30E055E0359527955A952F
:100A2000E1F7C20ED31E0D2C000CEE08FF0883FF69
:100A300020C092E0CC0CDD1CEE1CFF1C9A95D1F777
:100A40008370C80ED11CE11CF11CFE2CED2CDC2C9B
:100A5000CC248B81C80ED11CE11CF11CFE2CED2C8A
:100A6000DC2CCC248C81C80ED11CE11CF11C6894B8
:100A7000F7F88D818F70982EE8E081E090E0E9151D
:100A800028F1F801E35DFC4A6081C501C6DE83FF01
:100A900002C06894F6F8C092183CD092193CE092DB
:100AA0001A3CF0921B3C90921C3C035D1C4A292D81
:100AB00040E25CE3F8016281C50189DE20E0F801D3
:100AC00043816CE2C50131DE90E080E02596CDBF28
:100AD000DEBFDF91CF911F910F91FF90EF90DF90DC
:100AE000CF90BF90AF909F9008951F93CF93DF93C7
:100AF000EC0151DD80EA55DB80E053DB182FCE019D
:100B000006DC70E060E010FD04C011FF07C061E08A
:100B100070E0CE01DF91CF911F9157CF85E090E03B
:100B2000DF91CF911F910895CF92DF92EF92FF92C4
:100B30001F93CF93DF93EC01162F262F40EE6FE02B
:100B4000F4DD8FB7F894C090103CD090113CE09049
:100B5000123CF090133C8FBF8AE0C80ED11CE11C00
:100B6000F11C2FB7F8948091103C9091113CA0910A
:100B7000123CB091133C2FBF8C159D05AE05BF05EF
:100B800090F46EE0CE0149DE807E1813EACF81E05A
:100B900091E0892790E0DF91CF911F91FF90EF9036
:100BA000DF90CF90089580E0F3CF0F931F93CF9302
:100BB000DF93EC0160E8B8DF8C01892B61F440E041
:100BC0006AE2CE01F0DD40E969E2CE01ECDD42E807
:100BD00068E2CE01E8DDC801DF91CF911F910F914E
:100BE000089560E0A1CF7F928F929F92AF92BF92C3
:100BF000CF92DF92EF92FF920F931F93CF93DF93E9
:100C0000CDB7DEB7A297CDBFDEBF8C01C4DC80ECD0
:100C1000C8DAC8017CDB56DBCE0101967C018EE090
:100C2000F70111928A95E9F72EE0A70160E3C80168
:100C300095DD2EE0A70160E4C80190DD2EE0A7015C
:100C400060E5C8018BDD40E060E6C801ACDD40E056
:100C500060E7C801A8DD43EA6BE2C801A4DD24E037
:100C600047E660E6C80161DD21E047E660E7C801CC
:100C70005CDD8CE0E8EFF2E5DE011F9601900D925D
:100C80008A95E1F74E01FFE08F0E911CB12CA12C4B
:100C900028E0722EF401E190F1904F0160E8C80164
:100CA00043DF6C01892B09F065C0F2E0EF16F10417
:100CB00009F472C058F4E114F10409F473C0EA9421
:100CC000EF2889F0CC24C394D12C54C0E4E0EE1674
:100CD000F10409F465C008F461C085E0E816F10488
:100CE00089F768E101C064E091E0A916B10409F058
:100CF0005BC01E8E1D8E7C8E1B8E24E0AE01455E79
:100D00005F4FC8012BDDEFEFAE1ABE0AF6E0AF165B
:100D1000B10409F0BFCF1F8E18A281E090E089A333
:100D20009AA37E018FE1E80EF11C4E0193E2890E39
:100D3000911C98E0792EF701A190B1907F0160E8B5
:100D4000C801F2DE6C01892BA9F41E8E1D8E7C8EEB
:100D50001B8EA114B10469F1AA94AB2809F0B2CF9B
:100D600064E224E0AE01455E5F4FC801F7DC8E14FB
:100D70009F0409F7C601A296CDBFDEBFDF91CF91D8
:100D80001F910F91FF90EF90DF90CF90BF90AF90A9
:100D90009F908F907F90089568E0A6CF60E1A4CFE8
:100DA00064E1A2CF60E0A0CF1B8E1C8E1E8E1D8E34
:100DB000A4CF60E2D6CF1F920F920FB60F921124EC
:100DC0008F939F93AF93BF938091103C9091113C70
:100DD000A091123CB091133C0196A11DB11D8093CE
:100DE000103C9093113CA093123CB093133C81E0D3
:100DF0008093A60ABF91AF919F918F910F900FBEE4
:100E00000F901F9018951F93CF93DF93EC01162F2F
:100E100080D91883812F6BD9CE01DF91CF911F919B
:100E200076CAE7E6FCE384E0818381E38083E8E23D
:100E3000FCE31582148262E08CE69CE3E4DF63E06D
:100E40008BE69CE3E0DF68E08AE69CE3DCDF69E0B8
:100E500089E69CE3D8CF91E088ED84BF9093610050
:100E60008091020685608093020680910006816071
:100E700080930006809102068F7C80658093020635
:100E80001092E20582E08093E4059093030A8EEFCE
:100E90008093270A8093260A80E880932D0A809306
:100EA0002B0A8093290A80932C0A80932A0A809324
:100EB000280A89E08093000A87E08093E505E0E84E
:100EC000FAE037E02EEF90E885E0318324879587BC
:100ED00080837096E03C4AE0F407B9F71092A10ACB
:100EE0008FE39FE18093AC0A9093AD0A8091A50AAD
:100EF00081608093A50A1092A00A8091A00A816067
:100F00008093A00A789405D980916000806890E071
:100F100028ED24BF809360008CE69CE364DE8CE6C1
:100F20009CE343DE8CE69CE35CDE8BE69CE35BDECD
:100F30008BE69CE33ADE8BE69CE353DE8AE69CE399
:100F400052DE8AE69CE331DE8AE69CE34ADE89E6ED
:100F50009CE349DE89E69CE328DE89E69CE341DEEA
:100F600083DAC82F99DA9C2F8093143C9093153C18
:100F70008CE69CE306DD8BE69CE303DD8AE69CE3DE
:100F800000DD89E69CE3FDDCC0E0D0E08CE69CE37C
:100F9000ACDD892B51F48BE69CE353DC8AE69CE3C1
:100FA00050DC89E69CE34DDC8FDA8BE69CE39DDD2B
:100FB000892B51F48CE69CE344DC8AE69CE341DC1B
:100FC00089E69CE33EDC80DA8AE69CE38EDD892BB1
:100FD00051F48CE69CE335DC8BE69CE332DC89E65D
:100FE0009CE32FDC71DA89E69CE37FDD892B51F4E9
:100FF0008CE69CE326DC8BE69CE323DC8AE69CE320
:1010000020DC62DA5FD9209709F2FAD7BFCF38D057
:10101000A59F900DB49F900DA49F800D911D11244C
:10102000089597FD1094002E083098F00850232F53
:10103000342F452F562F672F782F892F912DF4CFDE
:101040001594979587957795679557954795379513
:1010500027950A95AAF71124002D08950024A7FDCD
:1010600000942A173005400550056005700580057D
:1010700090050895EE0FFF1F0590F491E02D09945F
:10108000A29FB001B39FC001A39F01D0B29F700D7A
:10109000811D1124911D08950F931F93CF93DF930A
:1010A0008230910510F482E090E0E091723CF09182
:1010B000733C30E020E0B0E0A0E0309799F42115D7
:1010C000310509F44AC0281B390B24303105D8F505
:1010D0008A819B816115710589F1FB01828393836C
:1010E000FE0111C0408151810281138148175907C7
:1010F000E0F04817590799F4109761F012960C9395
:10110000129713961C933296CF01DF91CF911F91C6
:101110000F9108950093723C1093733CF4CF211506
:10112000310551F04217530738F0A901DB019A014C
:10113000BD01DF01F801C1CFEF01F9CF8093723C0F
:101140009093733CCDCFFE01E20FF31F81939193F7
:101150002250310928833983D7CF2091703C3091B8
:10116000713C232B41F42091093C30910A3C20939F
:10117000703C3093713C2091073C3091083C211524
:10118000310541F42DB73EB740910B3C50910C3CDA
:10119000241B350BE091703CF091713CE217F30792
:1011A000A0F42E1B3F0B2817390778F0AC014E5FD7
:1011B0005F4F2417350748F04E0F5F1F4093703C78
:1011C0005093713C819391939FCFF0E0E0E09CCFEE
:1011D000CF93DF930097E9F0FC01329712821382DC
:1011E000A091723CB091733CED0130E020E010978B
:1011F000A1F420813181820F931F2091703C3091A6
:10120000713C2817390709F061C0E093703CF093F6
:10121000713CDF91CF910895EA01CE17DF07E8F521
:101220004A815B819E0141155105B1F7E901EA83CD
:10123000FB8349915991C40FD51FEC17FD0761F449
:10124000808191810296840F951FE901888399839B
:10125000828193818A839B83F0E0E0E012968D91F6
:101260009C9113970097B9F52D913C911197CD0161
:101270000296820F931F2091703C3091713C281789
:10128000390739F6309751F51092723C1092733C41
:10129000A093703CB093713CBCCFC283D383408198
:1012A0005181840F951FC817D90761F44E5F5F4FB6
:1012B00088819981480F591F408351838A819B817E
:1012C000828393832115310509F0B0CFE093723CFE
:1012D000F093733C9ECFFD01DC01C0CF12821382DC
:1012E000D7CFFB01DC0102C001900D92415050406C
:0812F000D8F70895F894FFCF30
:1012F80000000100020003000400050000000000D7
:1013080000000000000000000005010101010101CA
:1013180000000000000000000000000000000000C5
:10132800000002030060616601707176020001022C
:101338000304050607000102030405000102030473
:101348000506070001020304050607000102030061
:10135800010203040506000000000000000001016E
:101368000101010102020202020202020303030355
:101378000303030304040404050505050505050125
:101388000204081020408001020408102001020411
:101398000810204080010204081020408001020447
:0813A8000801020408102040B6
:0E13B000320000000000000000743C800000CD
:00000001FF

File diff suppressed because it is too large Load Diff

68
Software/Testfälle.txt Normal file
View File

@@ -0,0 +1,68 @@
Testfälle Meycan Switch
PreCons for each:
GIVEN XX XX is the deviceId of the target device
GIVEN YY YY is another device id, which is NOT XX XX
GIVEN 2nd CAN Debug Device on another CanBus of switch
1) A MeyPin can be triggered directly (repeat Test for all MeyPins and each CAN Bus Interface specified)
WHEN Send CAN Pkg 00 55 11 11 | XX XX 01 01 -> (MeyPin1 Should switch to on)
THEN The MeyPin 1 should trigger
THEN you receive a message 00 50 XX XX | 01 01
THEN 2nd device should receive 2 messages
* 00 50 XX XX | 01 01
* 00 55 11 11 | XX XX 01 01
1a) A MeyPin trigger is effecltess, if only set
GIVEN the above testcast
WHEN Send CAN Pkg 00 55 11 11 | XX XX 01 01
THEN Nothing changed
THEN you dont receive a message
THEN 2nd device should receive 00 55 11 11 | XX XX 01 01
WHEN Send CAN Pkg 00 55 11 11 | XX XX 01 00 -> (MeyPin1 Should switch to off)
THEN The MeyPin 1 should switch to OFF
THEN you receive a message 00 50 XX XX | 01 00
THEN 2nd device should receive 2 messages
* 00 50 XX XX | 01 00
* 00 55 11 11 | XX XX 01 00
2) A MeyPin is not triggered, if the device id dont match
WHEN Send CAN Pkg 00 55 11 11 | YY YY 01 01
THEN None of the pins of the device triggered
THEN you receive no message
THEN 2nd device should receive 1 messages
* 00 55 11 11 | XX XX 01 01
3) A MeyPin is not triggered, if the Package Type dont match
WHEN Send CAN Pkg 50 00 11 11 | YY YY 01 01
THEN None of the pins of the device triggered
THEN you receive no message
THEN 2nd device should receive 1 messages
* 50 00 11 11 | XX XX 01 01
3) A MeyPin is not triggered, if the MeyPin is above 8 (max pins)
WHEN Send CAN Pkg 00 55 11 11 | XX XX 09 01
THEN None of the pins of the device triggered
THEN you receive no message
THEN 2nd device should receive 1 messages
* 00 55 11 11 | XX XX 09 01
THEN you can execute any other testcase, as the switch didnt crash
4) All MeyPins can be activated more than 15 minutes in parallel(Activate each port for at least 15 mins)
GIVE You have a relais connected to each of the ports
WHEN Send CAN Pkg 00 55 11 11 | XX XX 01 01 -> (MeyPin1 Should switch to on)
WHEN Send CAN Pkg 00 55 11 11 | XX XX 02 01 -> (MeyPin2 Should switch to on)
WHEN Send CAN Pkg 00 55 11 11 | XX XX 03 01 -> (MeyPin3 Should switch to on)
WHEN Send CAN Pkg 00 55 11 11 | XX XX 04 01 -> (MeyPin4 Should switch to on)
WHEN Send CAN Pkg 00 55 11 11 | XX XX 05 01 -> (MeyPin5 Should switch to on)
WHEN Send CAN Pkg 00 55 11 11 | XX XX 06 01 -> (MeyPin6 Should switch to on)
WHEN Send CAN Pkg 00 55 11 11 | XX XX 07 01 -> (MeyPin7 Should switch to on)
WHEN Send CAN Pkg 00 55 11 11 | XX XX 08 01 -> (MeyPin8 Should switch to on)
THEN you should only receive the packages from above.
THEN you should NOT receive a VersionPackage
WHEN you wait 15 Minutes
THEN nothing should be send
THEN the Pins should not trigger

View File

@@ -0,0 +1,250 @@
#include "MeyCan.h";
#include <SPI.h>;
#include <mcp2515.h>;
PinState *MeyPin = NULL;
CanInterface *CanBusses = NULL;
uint16_t myDeviceId;
void SetupMeyPin(PinState *state)
{
pinMode(state->pin_id, OUTPUT);
digitalWrite(state->pin_id, LOW);
state->pin_state = false;
}
void InitCanInterface(MCP2515 *interface, can_frame *frame) // can_frame is NULL. Reuse ForEach Method for smaller footprint
{
interface->reset();
interface->setBitrate(CAN_500KBPS, MCP_8MHZ); //Sets CAN at speed 500KBPS and Clock 8MHz
interface->setNormalMode();
SendVersionPackage(interface);
}
void ForEachCanInterface(void (*handle)(MCP2515 *canInterace))
{
CanBusses->ForEach(handle);
}
void SetupMeyCan()
{
CalculateMyDeviceId();
if (MeyPin != NULL);
MeyPin->ForEach(SetupMeyPin);
if (CanBusses != NULL)
{
CanBusses->ForEach(InitCanInterface, NULL);
}
}
void SetCanInterface(byte index, byte pinId)
{
MCP2515* newCanInterface = new MCP2515(pinId);
CanInterface* canInterface = new CanInterface();
if (CanBusses == NULL)
CanBusses = canInterface;
else
CanBusses->AddCanInterface(canInterface);
}
void SetMeyPin(byte index, byte meyPinId, byte pinId)
{
PinState* newState = new PinState();
newState->Init(pinId, (byte) meyPinId);
if (MeyPin == NULL)
MeyPin = newState;
else
MeyPin->AddPinState(newState);
}
bool CheckPinStatus(PinState * state)
{
if (!state->is_input)
return false;
bool newValue = ReadPin(state);
if (newValue != state->pin_state)
{
delay(10);
newValue = ReadPin(state);
if (newValue != state->pin_state)
{
state->pin_state = newValue;
SendSwitchedTriggeredCanPackage(state->meyPinId, state->pin_state);
}
}
return false;
}
void CheckMeyPinsTriggered()
{
MeyPin->ForEach(CheckPinStatus);
}
bool ReadPin(PinState * state)
{
if (state->pin_id == PIN_PD2)
return digitalReadFast(PIN_PD2);
else if (state->pin_id == PIN_PC7)
return digitalReadFast(PIN_PC7);
else if (state->pin_id == PIN_PD1)
return digitalReadFast(PIN_PD1);
else if (state->pin_id == PIN_PD0)
return digitalReadFast(PIN_PD0);
else if (state->pin_id == PIN_PD6)
return digitalReadFast(PIN_PD6);
else if (state->pin_id == PIN_PD5)
return digitalReadFast(PIN_PD5);
else if (state->pin_id == PIN_PD4)
return digitalReadFast(PIN_PD4);
else if (state->pin_id == PIN_PD3)
return digitalReadFast(PIN_PD3);
else
return digitalRead(state->pin_id);
}
void HandleFrame(can_frame *frame, MCP2515 *source)
{
CanBusses->ForEach(DoSendCanPkg, frame, source);
HandleTriggerMeypinCanPackage(frame);
}
void HandleTriggerMeypinCanPackage(can_frame *frame)
{
if (GetPackageType(frame->can_id) == TRIGGER_SWITCH_CAN_ID)
{
uint16_t adressedDeviceId = ((uint16_t )frame->data[0] << 8) | frame->data[1] ;
if (adressedDeviceId != myDeviceId) return;
byte meyPinId = frame->data[2];
bool state = frame->data[3] > 0;
PinState *adressedPin = MeyPin->Find(meyPinId);
if (adressedPin != NULL)
{
if (adressedPin->is_input == true)
{
pinMode(adressedPin->pin_id, OUTPUT);
adressedPin->is_input = false;
}
bool pinChanged = adressedPin->pin_state != state;
adressedPin->pin_state = state;
if (pinChanged) {
digitalWrite(adressedPin->pin_id, state);
SendSwitchedTriggeredCanPackage(adressedPin->meyPinId, state);
}
}
}
}
byte CircularShift(byte b)
{
return (b << 1) | (b >> 7 & 1);
}
uint16_t GetDeviceId(uint32_t canFrameId)
{
return canFrameId & 0xFFFF;
}
uint16_t GetPackageType(uint32_t canFrameId)
{
return (canFrameId / 0x10000) & 0xFFF;
}
byte GetDeviceIdLow() {
return (SIGROW.SERNUM0 ^
CircularShift(SIGROW.SERNUM2) << 1 ^
CircularShift( CircularShift(SIGROW.SERNUM4)) ^
CircularShift( CircularShift( CircularShift(SIGROW.SERNUM6))) ^
CircularShift( CircularShift( CircularShift( CircularShift(SIGROW.SERNUM8)))));
}
byte GetDeviceIdHigh() {
return (SIGROW.SERNUM1 ^
CircularShift(SIGROW.SERNUM3) << 1 ^
CircularShift( CircularShift(SIGROW.SERNUM5)) ^
CircularShift( CircularShift( CircularShift(SIGROW.SERNUM7))) ^
CircularShift( CircularShift( CircularShift( CircularShift(SIGROW.SERNUM9)))));
}
uint32_t CreateCanId(uint16_t commandId)
{
return ((((uint32_t)commandId) & 0xFFF) * 0x10000) | myDeviceId | CAN_EFF_FLAG;
}
void SendVersionPackage(MCP2515 *interface)
{
can_frame toSend;
toSend.can_id = CreateCanId(HELP_PACKAGE_CAN_ID);
toSend.can_dlc = 6;
toSend.data[0] = SOFTWARE_VERSION_HIGH;
toSend.data[1] = SOFTWARE_VERSION_LOW;
toSend.data[2] = HARDWARE_VERSION_HIGH;
toSend.data[3] = HARDWARE_VERSION_LOW;
toSend.data[4] = (myDeviceId >> 8) & 0xFF;
toSend.data[5] = myDeviceId & 0xFF;
DoSendCanPkg(interface, &toSend);
}
void BroadcastTriggerMeyPinCanPackage(uint16_t targetCanId, byte pinId, byte state)
{
can_frame toSend;
toSend.can_id = CreateCanId(TRIGGER_SWITCH_CAN_ID);
toSend.can_dlc = 4;
toSend.data[0] = (targetCanId & 0xFF00) >> 8;
toSend.data[1] = targetCanId & 0xFF;
toSend.data[2] = pinId;
toSend.data[3] = state;
HandleFrame(&toSend, NULL);
}
void SendSwitchedTriggeredCanPackage(byte pinId, int state)
{
can_frame toSend;
toSend.can_id = CreateCanId(SWITCH_TRIGGERED_CAN_ID);
toSend.can_dlc = 2;
toSend.data[0] = pinId;
toSend.data[1] = state;
DoSendCanPkg(&toSend);
}
void DoSendCanPkg(can_frame *frame)
{
if (CanBusses != NULL)
CanBusses->ForEach(DoSendCanPkg, frame);
}
void DoSendCanPkg(MCP2515 *interface, can_frame *frame)
{
byte cnt = 0;
while (interface->sendMessage(frame))
{
if (++cnt > 10) return;
}
}
void CalculateMyDeviceId()
{
myDeviceId = (GetDeviceIdHigh() << 8) | GetDeviceIdLow();
}

View File

@@ -0,0 +1,128 @@
#ifndef MEYCAN_H
#define MEYCAN_H
#include <SPI.h>
#include <mcp2515.h>
typedef struct CanInterface
{
MCP2515 *interface;
CanInterface *next = NULL;
void ForEach(void (*handle)( MCP2515 *interface))
{
if (this->interface != NULL)
handle(this->interface);
if (this->next != NULL)
this->next->ForEach(handle);
}
void ForEach(void (*handle)( MCP2515 *interface, can_frame *frame), can_frame *frame, MCP2515* exclude = NULL)
{
if (this->interface != NULL && this->interface != exclude)
handle(this->interface, frame);
if (this->next != NULL)
this->next->ForEach(handle, frame);
}
void AddCanInterface(CanInterface *newCanInterface)
{
if (next == NULL)
{
this->next = newCanInterface;
newCanInterface->next = NULL;
} else {
next->AddCanInterface(newCanInterface);
}
}
};
typedef struct PinState
{
int pin_id;
bool pin_state;
bool is_input;
byte meyPinId;
PinState *next = NULL;
PinState() {}
void Init(int pin_id, byte meyPinId)
{
this->pin_id = pin_id;
this->pin_state = true;
this->is_input = true;
this->meyPinId = meyPinId;
}
void AddPinState(PinState *nextPinState)
{
if (next == NULL)
{
this->next = nextPinState;
nextPinState->next = NULL;
} else {
next->AddPinState(nextPinState);
}
}
PinState* Find(byte meyPinId)
{
if (this->meyPinId == meyPinId)
return this;
if (this->next != NULL)
return this->next->Find(meyPinId);
return NULL;
}
void ForEach(void (*handle)(PinState *theState))
{
handle(this);
if (this->next != NULL)
this->next->ForEach(handle);
}
};
const byte SOFTWARE_VERSION_HIGH = 5;
const byte SOFTWARE_VERSION_LOW = 0;
const byte HARDWARE_VERSION_HIGH = 7;
const byte HARDWARE_VERSION_LOW = 0;
const uint16_t HELP_PACKAGE_CAN_ID = 0x0FFFUL;
const uint16_t SWITCH_TRIGGERED_CAN_ID = 0x0050;
const uint16_t TRIGGER_SWITCH_CAN_ID = 0x0055;
void SetCanInterface(byte index, byte pinId);
void SetMeyPin(byte index, byte meyPinId, byte pinId);
void SetupMeyCan();
void ForEachCanInterface(void (*handle)(MCP2515 *canInterace));
bool ReadPin(PinState *state);
bool CheckPinStatus(PinState * state);
void CheckMeyPinsTriggered(); /* checks weather a meypin triggered and sends a can pkg is neccessary */
void HandleFrame(can_frame *frame, MCP2515 *source);
void HandleTriggerMeypinCanPackage(can_frame *frame);
byte CircularShift(byte b);
uint16_t GetDeviceId(uint32_t canFrameId);
uint16_t GetPackageType(uint32_t canFrameId);
byte GetDeviceIdLow();
byte GetDeviceIdHigh();
uint32_t CreateCanId(uint16_t commandId);
void SendVersionPackage(MCP2515 *interface);
void SendSwitchedTriggeredCanPackage(byte pinId, int state);
void BroadcastTriggerMeyPinCanPackage(uint16_t targetCanId, byte pinId, byte state);
void DoSendCanPkg(can_frame *frame);
void DoSendCanPkg(MCP2515 *interface, can_frame *frame);
void CalculateMyDeviceId();
#endif

View File

@@ -0,0 +1,104 @@
#include "MeyRule.h"
#include "MeyCan.h"
#include <Arduino.h>
#include <mcp2515.h>;
RemotePinInfo remotePinInfo = RemotePinInfo();
Rule *rules = NULL;
void PutRule(Rule *rule)
{
if (rules == NULL)
rules = rule;
else
rules->AddRule(rule);
}
void AddSimple(uint16_t sourceDevId, byte sourceMeyPinId, uint16_t targetDevId, byte targetMeyPinId)
{
Rule *rule = new Rule();
rule->sourceDevId = sourceDevId;
rule->sourceMeyPinId = sourceMeyPinId;
rule->targetDevId = targetDevId;
rule->targetMeyPinId = targetMeyPinId;
rule->toggle = false;
rule->inverse = false;
PutRule(rule);
}
void AddToggle(uint16_t sourceDevId, byte sourceMeyPinId, uint16_t targetDevId, byte targetMeyPinId)
{
Rule *rule = new Rule();
rule->sourceDevId = sourceDevId;
rule->sourceMeyPinId = sourceMeyPinId;
rule->targetDevId = targetDevId;
rule->targetMeyPinId = targetMeyPinId;
rule->toggle = true;
rule->inverse = false;
PutRule(rule);
}
void AddToggleInverse(uint16_t sourceDevId, byte sourceMeyPinId, uint16_t targetDevId, byte targetMeyPinId)
{
Rule *rule = new Rule();
rule->sourceDevId = sourceDevId;
rule->sourceMeyPinId = sourceMeyPinId;
rule->targetDevId = targetDevId;
rule->targetMeyPinId = targetMeyPinId;
rule->toggle = true;
rule->inverse = true;
PutRule(rule);
}
void CheckRule(uint16_t deviceId, uint8_t dt, uint8_t state, Rule *rule)
{
RemotePinInfo *currentPinState = remotePinInfo.FindOrAdd(rule->targetDevId);
if (currentPinState == NULL) return;
bool pinState = state > 0;
if (rule->inverse)
pinState = !pinState;
if (rule->toggle)
pinState = (currentPinState->getPinState(rule->targetMeyPinId) ^ true);
BroadcastTriggerMeyPinCanPackage(rule->targetDevId, rule->targetMeyPinId, pinState);
currentPinState->setPinState(rule->targetMeyPinId, pinState);
}
void HandleTriggered(can_frame *frame)
{
if (GetPackageType(frame->can_id) == SWITCH_TRIGGERED_CAN_ID)
{
RemotePinInfo *currentPinState = remotePinInfo.FindOrAdd(GetDeviceId(frame->can_id) );
if (currentPinState == NULL)
return;
currentPinState->setPinState(frame->data[0], frame->data[1]);
}
}
void HandleRules(can_frame *frame)
{
HandleTriggered(frame);
if (rules == NULL) return;
if (GetPackageType(frame->can_id) == SWITCH_TRIGGERED_CAN_ID)
{
uint16_t deviceId = GetDeviceId(frame->can_id);
uint8_t dt = frame->data[1];
uint8_t state = frame->data[0];
rules->Traverse(deviceId, dt, state, CheckRule);
}
}

View File

@@ -0,0 +1,111 @@
#ifndef MEYRULE_H
#define MEYRULE_H
#include <Arduino.h>
#include <mcp2515.h>;
struct Rule
{
uint16_t sourceDevId;
byte sourceMeyPinId;
uint16_t targetDevId;
byte targetMeyPinId;
bool toggle;
bool inverse;
Rule *nextRule = NULL;
void AddRule(Rule *rule)
{
if (this->nextRule == NULL)
{
this->nextRule = rule;
rule->nextRule = NULL;
} else {
this->nextRule->AddRule(rule);
}
}
void Traverse( uint16_t deviceId, uint8_t dt, uint8_t state, void (*handle)(uint16_t, uint8_t, uint8_t, Rule*))
{
if ( this->sourceDevId == deviceId && this->sourceMeyPinId == state)
handle(deviceId, dt, state, this);
if (this->nextRule != NULL)
this->nextRule->Traverse(deviceId, dt, state, handle);
}
};
typedef struct RemotePinInfo
{
const byte MAX_REMOTE_PIN_COUNT = 64;
uint16_t DeviceId = 0; // the id of the device
uint8_t pinState = 0; // bitmap of 8 MeyPin states of the device. 0000 0100, MeyPin #3 is HIGH in this example
RemotePinInfo *next = NULL;
bool getPinState(byte meyPin)
{
return (this->pinState >> (meyPin - 1)) & 1;
}
void setPinState(byte meyPin, bool state)
{
if (state)
this->pinState = this->pinState | (1 << (meyPin - 1)); // 0001 0000
else
this->pinState = this->pinState & (~(1 << (meyPin - 1))); // 1110 1111 -> not
}
int16_t Count()
{
if (this->next == NULL) return 1;
return this->next->Count() + 1;
}
RemotePinInfo* FindOrAdd(uint16_t deviceId, byte count = 0)
{
if (count > MAX_REMOTE_PIN_COUNT)
return NULL;
if (this->DeviceId == 0 && this->pinState == 0)
{
this->DeviceId = deviceId;
this->pinState = 0;
}
if (this->DeviceId == deviceId)
{
//ToggleDebug();
return this;
}
if (next != NULL)
{
return next->FindOrAdd(deviceId, count + 1);
}
RemotePinInfo *theNext = new RemotePinInfo;
theNext->DeviceId = deviceId;
theNext->pinState = 0;
theNext->next = NULL;
this->next = theNext;
return this->next;
}
};
extern RemotePinInfo remotePinInfo;
extern Rule *rules;
void AddSimple(uint16_t sourceDevId, byte sourceMeyPinId, uint16_t targetDevId, byte targetMeyPinId);
void AddToggle(uint16_t sourceDevId, byte sourceMeyPinId, uint16_t targetDevId, byte targetMeyPinId);
void AddToggleInverse(uint16_t sourceDevId, byte sourceMeyPinId, uint16_t targetDevId, byte targetMeyPinId);
void HandleRules(can_frame *frame);
void PutRule(Rule *rule);
void CheckRule(uint16_t deviceId, uint8_t dt, uint8_t state, Rule *rule);
#endif

View File

@@ -1,246 +1,32 @@
#include <SPI.h>; #include <SPI.h>;
#include <mcp2515.h>; #include <mcp2515.h>;
#include "MeyCan.h";
struct can_frame _frame;
MCP2515 mcp2515(PIN_PD4);
const byte SoftwareVersionHigh = 3;
const byte SoftwareVersionLow = 0;
const byte HardwareVersionHigh = 5;
const byte HardwareVersionLow = 0;
typedef struct PinState
{
int pin_id;
bool pin_state;
bool is_input;
byte meyPinId;
PinState() {}
void Init(int pin_id, byte meyPinId)
{
this->pin_id = pin_id;
this->pin_state = true;
this->is_input = true;
this->meyPinId = meyPinId;
}
} ;
int PinCount = 8;
PinState MeyPins[8];
int16_t myDeviceId;
void setup() { void setup() {
return;
SPI.begin(); SPI.begin();
MeyPins[0] = PinState();
MeyPins[0].Init(PIN_PD0, (byte) 1);
MeyPins[1] = PinState();
MeyPins[1].Init(PIN_PD2, (byte) 2);
MeyPins[2] = PinState();
MeyPins[2].Init(PIN_PD5, (byte) 3);
MeyPins[3] = PinState();
MeyPins[3].Init(PIN_PD7, (byte) 4);
MeyPins[4] = PinState();
MeyPins[4].Init(PIN_PC7, (byte) 5);
MeyPins[5] = PinState();
MeyPins[5].Init(PIN_PD1, (byte) 6);
MeyPins[6] = PinState();
MeyPins[6].Init(PIN_PD3, (byte) 7);
MeyPins[7] = PinState();
MeyPins[7].Init(PIN_PD6, (byte) 8);
_PROTECTED_WRITE(CLKCTRL.MCLKCTRLA, CLKCTRL.MCLKCTRLA | 1 << 7); _PROTECTED_WRITE(CLKCTRL.MCLKCTRLA, CLKCTRL.MCLKCTRLA | 1 << 7);
delay(10); // a bit delay for mcp2515 to get the clock
SetMeyPin(0, 1, PIN_PD0);
SetMeyPin(1, 2, PIN_PC7);
SetMeyPin(2, 3, PIN_PD2);
SetMeyPin(3, 4, PIN_PD1);
SetMeyPin(4, 5, PIN_PD5);
SetMeyPin(5, 6, PIN_PD3);
SetMeyPin(6, 7, PIN_PD7);
SetMeyPin(7, 8, PIN_PD6);
delay(20); delay(20);
mcp2515.reset();
mcp2515.setBitrate(CAN_500KBPS, MCP_8MHZ); //Sets CAN at speed 500KBPS and Clock 8MHz
mcp2515.setNormalMode();
for (int i = 0; i <= PinCount - 1; i++) SetCanInterface(0, PIN_PD4);
{ SetupMeyCan();
pinMode(MeyPins[i].pin_id, INPUT_PULLUP);
MeyPins[i].pin_state = ReadPin(&MeyPins[i]);
}
CalculateMyDeviceId();
SendSerialPackage();
} }
void loop() void loop()
{ {
for (int i = 0; i <= PinCount - 1; i++) CheckMeyPinsTriggered();
{
if (CheckPinStatus(&MeyPins[i]))
SendSwitchedTriggeredCanPackage(MeyPins[i].meyPinId, MeyPins[i].pin_state);
}
if (mcp2515.readMessage(&_frame) == MCP2515::ERROR_OK)
{
if (GetDeviceId(_frame.can_id) == GetMyDeviceId())
{
int meyPinId = _frame.data[0];
bool state = _frame.data[1] > 0;
PinState *adressedPin;
for (int i = 0; i <= PinCount - 1; i++)
if (MeyPins[i].meyPinId == meyPinId)
{
adressedPin = &MeyPins[i];
break;
}
if (adressedPin != NULL)
{
if (adressedPin->is_input == true)
{
pinMode(adressedPin->pin_id, OUTPUT);
adressedPin->is_input = false;
}
adressedPin->pin_state = state;
digitalWrite(adressedPin->pin_id, state);
}
}
}
delay(20);
}
void SendSerialPackage()
{
_frame.can_id = CreateCanId(0xFFFF);
_frame.can_dlc = 4;
_frame.data[0] = SoftwareVersionHigh;
_frame.data[1] = SoftwareVersionLow;
_frame.data[2] = HardwareVersionHigh;
_frame.data[3] = HardwareVersionLow;
mcp2515.sendMessage(MCP2515::TXB1, &_frame);
}
void SendSwitchedTriggeredCanPackage(byte pinId, int state)
{
_frame.can_id = CreateCanId(0x050);
_frame.can_dlc = 2;
_frame.data[0] = pinId;
_frame.data[1] = state;
mcp2515.sendMessage(MCP2515::TXB1, &_frame);
}
void SendDoTriggerSwitchCanPackage(uint32_t targetCanId, byte pinId, byte state)
{
_frame.can_id = CreateCanId(0x050);
_frame.can_dlc = 4;
_frame.data[0] = targetCanId & 0xFF;
_frame.data[1] = (targetCanId & 0xFF00) >> 8;
_frame.data[2] = pinId;
_frame.data[3] = state;
mcp2515.sendMessage(MCP2515::TXB1, &_frame);
}
bool ReadPin(PinState * state)
{
if (state->pin_id == PIN_PD2)
return digitalReadFast(PIN_PD2);
else if (state->pin_id == PIN_PC7)
return digitalReadFast(PIN_PC7);
else if (state->pin_id == PIN_PD1)
return digitalReadFast(PIN_PD1);
else if (state->pin_id == PIN_PD0)
return digitalReadFast(PIN_PD0);
else if (state->pin_id == PIN_PD6)
return digitalReadFast(PIN_PD6);
else if (state->pin_id == PIN_PD5)
return digitalReadFast(PIN_PD5);
else if (state->pin_id == PIN_PD4)
return digitalReadFast(PIN_PD4);
else if (state->pin_id == PIN_PD3)
return digitalReadFast(PIN_PD3);
else
return digitalRead(state->pin_id);
}
byte CircularShift(byte b)
{
return (b << 1) | (b >> 7 & 1);
}
uint32_t GetDeviceId(uint32_t canFrameId)
{
return canFrameId & 0xFFFF;
}
uint32_t GetPackageType(uint32_t canFrameId)
{
return (canFrameId / 0x10000) & 0xFFF;
}
uint32_t CreateCanId(uint32_t commandId)
{
return ((commandId & 0xFFF) * 0x10000) | GetMyDeviceId() | CAN_EFF_FLAG;
}
void CalculateMyDeviceId()
{
myDeviceId = (GetDeviceIdHigh() << 8) | GetDeviceIdLow();
}
uint16_t GetMyDeviceId()
{
return myDeviceId;
}
byte GetDeviceIdLow() {
return (SIGROW.SERNUM0 ^
CircularShift(SIGROW.SERNUM2) << 1 ^
CircularShift( CircularShift(SIGROW.SERNUM4)) ^
CircularShift( CircularShift( CircularShift(SIGROW.SERNUM6))) ^
CircularShift( CircularShift( CircularShift( CircularShift(SIGROW.SERNUM8)))));
}
byte GetDeviceIdHigh() {
return (SIGROW.SERNUM1 ^
CircularShift(SIGROW.SERNUM3) << 1 ^
CircularShift( CircularShift(SIGROW.SERNUM5)) ^
CircularShift( CircularShift( CircularShift(SIGROW.SERNUM7))) ^
CircularShift( CircularShift( CircularShift( CircularShift(SIGROW.SERNUM9)))));
}
bool CheckPinStatus(PinState * state)
{
if (!state->is_input)
return false;
bool newValue = ReadPin(state);
if (newValue != state->pin_state)
{
delay(10);
newValue = ReadPin(state);
if (newValue != state->pin_state)
{
state->pin_state = newValue;
return true;
}
}
return false;
} }

View File

@@ -1,283 +0,0 @@
:1000000050C0000068C0000066C0000064C000006E
:1000100062C0000060C000005EC000005CC0000064
:100020005AC0000058C0000056C0000054C0000074
:1000300052C0000050C000004EC000004CC0000084
:100040004AC0000048C0000046C0000044C0000094
:1000500042C0000040C000003EC000003CC00000A4
:100060003AC0000002C5000036C0000034C00000E5
:1000700032C0000030C000002EC000002CC00000C4
:100080002AC0000028C0000026C0000024C00000D4
:1000900022C0000020C000001EC000001CC00000E4
:1000A0005D0511241FBECFEFCDBFDFE3DEBF2CE324
:1000B000A0E0BCE301C01D92A838B207E1F710E050
:1000C000C1E5D0E003C02197FE01E7D7C035D107D5
:1000D000D1F704D5FDC794CF00008093C408809168
:1000E000C30887FFFCCF8091C4080895CF93DF93A6
:1000F00090E0FC01E55AFE4A20812F3F61F0FC01AF
:10010000EE5CFE4AE08130E2E39FF0011124FC5FE7
:10011000613021F42183DF91CF910895875F9E4A5A
:10012000EC01A881AF3F69F0CF014096A80FB92F2D
:10013000B11D9FB7F89422838C9188608C939FBFE8
:10014000EACFB0E0A0E0F5CF8091473C811117C025
:100150001092483C1092493C10924A3C10924B3C01
:1001600010924C3C10924D3C10924E3C10924F3CE1
:100170001092503C1092513C81E08093473C80911A
:10018000E3058C7F9091463C892B8093E305911188
:1001900019C061E084E0AADF61E086E0A7DF80911A
:1001A000C10884608093C1088091C00881628093F7
:1001B000C0089091403C8091413C9093C00880934E
:1001C000C1080895913031F461E08EE08FDF61E085
:1001D00080E1E4CF923019F761E08EE187DF61E0E2
:1001E00080E2DCCF90E0FC01E052FF4AE081EE23A8
:1001F00019F1E13021F000F1E630A8F00895875FB1
:100200009E4AFC012081233008F02F5F3091010AC3
:1002100081E090E001C0880F2A95EAF7809583235A
:100220008093010A089580E1E89FF0011124E05ACB
:10023000F54F81818F7E818308950F931F93CF9314
:10024000DF93C82FD0E0FE01E55AFE4A00810F3F40
:1002500099F0162F893208F4C5DFFE01EE5CFE4AE4
:10026000E08180E2E89FF0011124FC5F808180231F
:1002700051F0111106C00683DF91CF911F910F91AC
:1002800008950583F9CFC75FDE4A8881309771F002
:100290008F3F61F07096E80FF11D9FB7F894808151
:1002A000111107C0877F80839FBFE6CFF0E0E0E0B9
:1002B000F4CF8860F8CF8F929F92AF92BF92CF9287
:1002C000DF92EF92FF920F93CF93DF938091813C67
:1002D000893210F461E0B1DF8091483C882319F045
:1002E00081FF0DC07894DF91CF910F91FF90EF9037
:1002F000DF90CF90BF90AF909F908F90089580FF38
:10030000F2CF80904A3C90904B3CA0904C3CB090F7
:100310004D3CC12CD12C7601E0E09401A501B60141
:10032000C701A0E0AED681F1217030E040E050E09E
:1003300060E070E080E090E0A4D6D1F0B0E0A0E012
:10034000E03370F4AE2FA695A695A69580E2A89FFF
:10035000D0011124A05FBB4F8E2F8770A80FB11D55
:10036000CE2FD0E0CE5BD34C88899C91892B8C9387
:100370009401A501B601C70101E068D649015A01FF
:100380006B017C01EF5FC9CF80904E3C90904F3C59
:10039000A090503CB090513CC12CD12C7601E0E2B1
:1003A0009401A501B601C701A0E06BD609F49BCF6B
:1003B000217030E040E050E060E070E080E090E0EC
:1003C00060D6D1F0B0E0A0E0E03370F4AE2FA69597
:1003D000A695A69580E2A89FD0011124A05FBB4FEF
:1003E0008E2F8770A80FB11DCE2FD0E0CE5BD34CDF
:1003F00088899C91892B8C939401A501B601C70132
:1004000001E024D649015A016B017C01EF5FC8CF9E
:100410008FB7F89420912B3C30912C3C40912D3C8F
:1004200050912E3CE091AA0AF091AB0A9091A60A55
:1004300090FF08C02F5F3F4F4F4F5F4FE091AA0AD8
:10044000F091AB0A8FBFA8EEB3E0F4D523E0F695A8
:10045000E7952A95E1F76E0F7F1F811D911D089585
:100460008F929F92AF92BF92CF92DF92EF92FF92C4
:100470004B015C01CDDF6B017C01A8EEB3E0A5016F
:100480009401D8D5C60ED71EE81EF91EC616D7068B
:10049000E806F90610F4BCDFF9CFBADF6C157D056C
:1004A0008E059F05D0F3FF90EF90DF90CF90BF9027
:1004B000AF909F908F9008950F931F93CF93FC015F
:1004C000808191818831910541F48EB182FB88272A
:1004D00080F9CF911F910F9108958531910529F4ED
:1004E0008AB1881F8827881FF4CF8731910521F4AE
:1004F0008EB186958170EDCF8631910519F48EB15C
:100500008170E7CF8C31910529F48EB186FB882765
:1005100080F9DFCF8B31910529F48EB185FB8827D7
:1005200080F9D7CF8A31910521F48EB182958170FF
:10053000D0CF8931910529F48EB183FB882780F9CA
:10054000C8CF8932B0F48C011127F801E55AFE4A70
:10055000C081CF3F71F046DEF801EE5CFE4AE081DB
:1005600080E2E89FF0011124FC5F8085C82381E0D0
:1005700039F680E0C5CF8F929F92AF92BF92CF9213
:10058000DF92EF92FF920F93CF93DF938091483CDD
:10059000882319F081FF19C0F89481E38093C00883
:1005A00084E08093C1088091813C893208F098C032
:1005B00060E0DF91CF910F91FF90EF90DF90CF90AF
:1005C000BF90AF909F908F9038CE80FFE6CF809005
:1005D0004A3C90904B3CA0904C3CB0904D3CC12C80
:1005E000D12C7601E0E09401A501B601C701A0E09D
:1005F00048D589F1217030E040E050E060E070E0E3
:1006000080E090E03ED5D9F0B0E0A0E0E03370F4B7
:10061000AE2FA695A695A69580E2A89FD00111249D
:10062000A05FBB4F8E2F8770A80FB11DCE2FD0E0DB
:100630008C91CE5BD34C888B8C91887F8C9394016A
:10064000A501B601C70101E001D549015A016B01BD
:100650007C01EF5FC8CF80904E3C90904F3CA090C3
:10066000503CB090513CC12CD12C7601E0E2940179
:10067000A501B601C701A0E004D509F48ECF217011
:1006800030E040E050E060E070E080E090E0F9D4DD
:10069000D9F0B0E0A0E0E03370F4AE2FA695A695B7
:1006A000A69580E2A89FD0011124A05FBB4F8E2F9A
:1006B0008770A80FB11DCE2FD0E08C91CE5BD34CAC
:1006C000888B8C91887F8C939401A501B601C7011A
:1006D00001E0BCD449015A016B017C01EF5FC7CF37
:1006E000DF91CF910F91FF90EF90DF90CF90BF906F
:1006F000AF909F908F900895FF920F931F93CF9389
:10070000DF93C82FF62E172F042F35DF82E0E4DCAD
:100710008C2FE2DCCF2DD12F0C0F1D2F111DC017F8
:10072000D10719F08991D8DCFACFDF91CF911F91D1
:100730000F91FF90C0CD1F93CF93DF93182FD62F2B
:10074000C42F19DF85E0C8DC812FC6DC8D2FC4DC07
:100750008C2FC2DCDF91CF911F91ADCDCF93C82FED
:100760000ADF83E0B9DC8C2FB7DC80E0B5DCC82F72
:10077000A2DD8C2FCF910895CF92DF92EF92FF925E
:10078000CF93C82F482F60EE8FE0D5DF8FB7F89456
:10079000C0902B3CD0902C3CE0902D3CF0902E3C17
:1007A0008FBF8AE0C80ED11CE11CF11C2FB7F89452
:1007B00080912B3C90912C3CA0912D3CB0912E3CF3
:1007C0002FBF8C159D05AE05BF0578F48EE0C6DF02
:1007D000807EC813EBCF81E091E0892790E0CF9134
:1007E000FF90EF90DF90CF90089580E0F5CFCF930A
:1007F000DF93D82FC62FBFDE82E06EDC8D2F6CDC3E
:100800008C2F6ADCDF91CF9156CDFF920F931F930F
:10081000CF93DF93C82FF62E172F042FACDE83E083
:100820005BDC8C2F59DCCF2DD12F0C0F1D2F111D10
:10083000C017D10721F080E04FDC8993F9CFDF9119
:10084000CF911F910F91FF9036CDBF92CF92DF9243
:10085000EF92FF920F931F93CF93DF93CDB7DEB745
:100860002597CDBFDEBF8C01000F111F000F111F98
:10087000F801EC57FE4A45E0BE016F5F7F4F818172
:10088000C4DF8A81C98098E0C99E60011124282FA5
:1008900030E055E0359527955A95E1F7C20ED31E05
:1008A0000D2C000CEE08FF0883FF20C092E0CC0C5A
:1008B000DD1CEE1CFF1C9A95D1F78370C80ED11C6D
:1008C000E11CF11CFE2CED2CDC2CCC248B81C80E01
:1008D000D11CE11CF11CFE2CED2CDC2CCC248C81D9
:1008E000C80ED11CE11CF11C6894F7F88D818F7043
:1008F000B82EE8E081E090E0EB1510F1F801EC573C
:10090000FE4A80812BDF83FF02C06894F6F8C09214
:10091000303CD092313CE092323CF092333CB09289
:10092000343C0C571E4A4B2D68E37CE3F80182816E
:100930006CDF40E0F80163818CE2FDDE90E080E056
:100940002596CDBFDEBFDF91CF911F910F91FF9014
:10095000EF90DF90CF90BF900895CF92DF92EF920B
:10096000FF920F931F93CF93DF93CDB7DEB72D97F1
:10097000CDBFDEBF8091303C9091313CA091323CA4
:10098000B091333CAC01BD01442777FD4395552719
:10099000662777276C017D01CC24DD24EE2420E43A
:1009A000F2220FEF1FEF2FEF3FE1411104C00FEFD5
:1009B00017E020E030E080239123A223B3234423D7
:1009C00009F442C08C839B83CD01AA27BB27282F23
:1009D00023702860382F330F330F330F307E232BD3
:1009E0002A8335E0969587953A95E1F789831091AA
:1009F000343C812FCD28CE28CF2809F080648D8308
:100A0000412F50E068E37CE3CE01069658D345E0E1
:100A1000410FBE016F5F7F4F81E46EDE48E068E00A
:100A200080E489DE80E49ADE8077E1F084E090E083
:100A30002D96CDBFDEBFDF91CF911F910F91FF901B
:100A4000EF90DF90CF9008959C0193E03695279525
:100A50009A95E1F729838295880F807E8A831C828C
:100A60001B82C5CF90E080E0E3CF1F920F920FB6BC
:100A70000F9211248F939F93AF93BF9380912B3C40
:100A800090912C3CA0912D3CB0912E3C0196A11D43
:100A9000B11D80932B3C90932C3CA0932D3CB093A4
:100AA0002E3C81E08093A60ABF91AF919F918F91D8
:100AB0000F900FBE0F901F901895E0E4FCE384E0C8
:100AC000818381E38083E2E4FCE3158214823CDBD2
:100AD00083E08093813C61E009DBEDCBCF93DF9332
:100AE000CDB7DEB7A297CDBFDEBF91E088ED84BF62
:100AF0009093610080910206856080930206809148
:100B00000006816080930006809102068F7C8065DC
:100B1000809302061092E20582E08093E4059093B0
:100B2000030A8EEF8093270A8093260A80E8809339
:100B30002D0A80932B0A8093290A80932C0A809394
:100B40002A0A8093280A89E08093000A87E080932C
:100B5000E505E0E8FAE017E09EEF80E805E01183A4
:100B60009487858700837096E03C2AE0F207B9F706
:100B70001092A10A8FE39FE18093AC0A9093AD0A93
:100B80008091A50A81608093A50A1092A00A8091A5
:100B9000A00A81608093A00A7894D6DA85E190E07B
:100BA0008093033C9093043C81E08093053C8093C8
:100BB000063C8093073C26E130E02093083C3093CC
:100BC000093C80930A3C80930B3C92E090930C3C50
:100BD00027E130E020930D3C30930E3C80930F3C96
:100BE0008093103C93E09093113C28E130E02093F7
:100BF000123C3093133C8093143C8093153C94E05A
:100C00009093163C2CE130E02093173C3093183C35
:100C10008093193C80931A3C00931B3C2BE130E0FD
:100C200020931C3C30931D3C80931E3C80931F3CC2
:100C300096E09093203C2AE130E02093213C3093D1
:100C4000223C8093233C8093243C1093253C29E153
:100C500030E02093263C3093273C8093283C8093BF
:100C6000293C88E080932A3C80916000806890E075
:100C700028ED24BF809360007EDC80EC2DDA1BDB46
:100C80006AE070E080E090E0EBDB8E010F5F1F4FC9
:100C90008EE0F80111928A95E9F74EE0B80180E301
:100CA0002BDD4EE0B80180E427DD4EE0B80180E5A1
:100CB00023DD60E080E69BDD60E080E798DD63EAAD
:100CC0008BE295DD44E067E680E635DD41E067E6EE
:100CD00080E731DD8CE0E4EDF0E5DE011F96019068
:100CE0000D928A95E1F75E01FFE0AF0EB11CD12CA9
:100CF000C12CB8E09B2EF501019111915F0180E8B4
:100D00003BDD892B71F40230110509F475C108F03F
:100D10002CC10115110509F434C10130110509F484
:100D200071C180E829DD892B49F460E08AE25FDD4A
:100D300060E989E25CDD62E888E259DD80E01CDD83
:100D4000FBE2CF2EFCE3DF2E03E01CE3F801808101
:100D5000893210F462E0CAD9C801AEDBF80182839F
:100D60000B5F1F4FC016D10689F750910311909168
:100D70000511409107113091091120910B11892F14
:100D8000880F811D880F8527942F990F911D990F2A
:100D9000911D8927932F929590FB979597F9892715
:100DA000922F929589278093003C50910411409195
:100DB00006113091081120910A1190910C11440FE5
:100DC000411D440F4527330F311D330F311D43277C
:100DD000229520FB279527F9422792954927409392
:100DE000013C90E0982F8827092E000CAA0BBB0B22
:100DF00050E070E060E06F6F7F68842B952BA62B2E
:100E0000B72B8093303C9093313CA093323CB0930D
:100E1000333C84E08093343C81E08093383C1092F2
:100E2000393C82E080933A3C10923B3C96DD992419
:100E3000939465E0862E70E0A72E70E0B72EE2E076
:100E40007E2E33E0C32E3CE3D32EF601838188232C
:100E5000C1F1C60131DBF6019281891791F16AE097
:100E600070E080E090E0FCDAC60126DBF6019281BA
:100E7000891739F1828394814091003C50E0542FCE
:100E80004427052E000C660B770B2090013C312C7B
:100E9000512C412CF0E54F2A689457F842295329E8
:100EA000642975294093303C5093313C6093323C27
:100EB0007093333C7092343C9093383C8093393C2F
:100EC0004CDD25E0C20ED11CC016D10609F0BDCF05
:100ED00052DB80EA01D980E0FFD8D82EECD990E02F
:100EE00080E0D0FC04C0D1FE35C081E090E0ADDCF4
:100EF000892B81F58091023C89258093023C2091C9
:100F0000383CDD24D3948091393C811101C0D12C2F
:100F1000E3E0FCE390E080E03481231384C0889E0A
:100F20009001899E300D1124C9018D5F934C7C0185
:100F3000F7018381882339F08081893210F461E0E0
:100F4000D5D8F7011382F701D2828081893210F45B
:100F50006D2D73D964E170E080E090E081DAA11436
:100F6000B10409F46ECF4CD86CCF0430110509F4EC
:100F700047C008F443C00530110509F0D2CE88E11E
:100F800001C080E0F1E0CF16D104F1F51E8E1D8E78
:100F90009C8E1B8E44E0BE01655E7F4FADDB2FEF64
:100FA000C21AD20A86E0C816D10409F0A4CE1F8E58
:100FB00018A281E090E089A39AA38E01015E1F4FE1
:100FC0005E0193E2A90EB11CA8E09A2EF801C1902F
:100FD000D1908F0180E8D0DB892B09F0A2CE1E8E44
:100FE0001D8E9C8E1B8EC114D10499F0CA94CD28FD
:100FF00009F097CE84E20EC088E0C4CF80E1C2CF72
:1010000084E1C0CF84E0BECF1B8E1C8E1E8E1D8E51
:10101000C1CF80E244E0BE01655E7F4F6DDB0A1503
:101020001B05A1F67ECE019635968830910509F014
:1010300073CF7ECF38D0A59F900DB49F900DA49F05
:10104000800D911D1124089597FD1094002E0830F5
:1010500098F00850232F342F452F562F672F782FC5
:10106000892F912DF4CF159497958795779567954E
:1010700057954795379527950A95AAF71124002D7E
:1010800008950024A7FD00942A1730054005500557
:1010900060057005800590050895EE0FFF1F05900F
:1010A000F491E02D0994A29FB001B39FC001A39FCA
:1010B00001D0B29F700D811D1124911D0895FB0177
:1010C000DC0102C001900D9241505040D8F70895C4
:0410D000F894FFCFC2
:1010D40000000100020003000400050000000000FD
:1010E40000000000000000000005010101010101F1
:1010F40000000000000000000000000000000000EC
:1011040000000203000001020304050607000102B7
:101114000304050001020304050607000102030499
:10112400050607000102030001020304050600008E
:10113400000000000000010101010101020202029D
:10114400020202020303030303030303040404046B
:101154000505050505050501020408102040800168
:101164000204081020010204081020408001020437
:1011740008102040800102040801020408102040E5
:081184006061660170717602E2
:00000001FF

File diff suppressed because it is too large Load Diff

View File

@@ -1,33 +0,0 @@
:100000004FC000005DC000005BC0000059C0000090
:1000100057C0000055C0000053C0000051C0000090
:100020004FC000004DC000004BC0000049C00000A0
:1000300047C0000045C0000043C0000041C00000B0
:100040003FC000003DC000003BC0000039C00000C0
:1000500037C0000035C0000033C0000031C00000D0
:100060002FC000002EC000002BC0000029C00000DF
:1000700027C0000025C0000023C0000021C00000F0
:100080001FC000001DC000001BC0000019C0000000
:1000900017C0000015C0000013C0000011C0000010
:1000A00011241FBECFEFCDBFDFE3DEBF2CE3A0E006
:1000B000BCE301C01D92A430B207E1F72AD09BC077
:1000C0009FCF1F920F920FB60F9211248F939F9381
:1000D000AF93BF938091003C9091013CA091023C72
:1000E000B091033C0196A11DB11D8093003C9093FB
:1000F000013CA093023CB093033C81E08093A60AAC
:10010000BF91AF919F918F910F900FBE0F901F9055
:10011000189588ED90E084BF90936100809102066D
:1001200086608093020680910006816080930006BD
:10013000809102068F7C8065809302061092E20512
:1001400082E08093E40581E08093030A8EEF809340
:10015000270A8093260A80E880932D0A80932B0A31
:100160008093290A80932C0A80932A0A8093280A74
:100170008BE08093000A87E08093E505E0E8FAE0F1
:1001800037E02EEF90E885E03183248795878083E0
:100190007096E03C4AE0F407B9F71092A10A8FE7A5
:1001A0009EE38093AC0A9093AD0A8091A50A81608A
:1001B0008093A50A1092A00A8091A00A8160809382
:1001C000A00A789482E08093010412E0C0E0D0E0BD
:1001D0008091000481FF06C0109305042097C1F3AD
:1001E0000FDFF6CF9FB7F894809111048860809359
:0A01F00011049FBFF3CFF894FFCF76
:00000001FF

View File

@@ -1,590 +0,0 @@
C:\Users\Martin\AppData\Local\Temp\arduino_build_659813/sketch_jun30b.ino.elf: file format elf32-avr
Disassembly of section .text:
00000000 <__vectors>:
__vectors():
../../../../../crt1/gcrt1.S:61
0: 4f c0 rjmp .+158 ; 0xa0 <__ctors_end>
2: 00 00 nop
../../../../../crt1/gcrt1.S:67
4: 5d c0 rjmp .+186 ; 0xc0 <__bad_interrupt>
6: 00 00 nop
../../../../../crt1/gcrt1.S:68
8: 5b c0 rjmp .+182 ; 0xc0 <__bad_interrupt>
a: 00 00 nop
../../../../../crt1/gcrt1.S:69
c: 59 c0 rjmp .+178 ; 0xc0 <__bad_interrupt>
e: 00 00 nop
../../../../../crt1/gcrt1.S:70
10: 57 c0 rjmp .+174 ; 0xc0 <__bad_interrupt>
12: 00 00 nop
../../../../../crt1/gcrt1.S:71
14: 55 c0 rjmp .+170 ; 0xc0 <__bad_interrupt>
16: 00 00 nop
../../../../../crt1/gcrt1.S:72
18: 53 c0 rjmp .+166 ; 0xc0 <__bad_interrupt>
1a: 00 00 nop
../../../../../crt1/gcrt1.S:73
1c: 51 c0 rjmp .+162 ; 0xc0 <__bad_interrupt>
1e: 00 00 nop
../../../../../crt1/gcrt1.S:74
20: 4f c0 rjmp .+158 ; 0xc0 <__bad_interrupt>
22: 00 00 nop
../../../../../crt1/gcrt1.S:75
24: 4d c0 rjmp .+154 ; 0xc0 <__bad_interrupt>
26: 00 00 nop
../../../../../crt1/gcrt1.S:76
28: 4b c0 rjmp .+150 ; 0xc0 <__bad_interrupt>
2a: 00 00 nop
../../../../../crt1/gcrt1.S:77
2c: 49 c0 rjmp .+146 ; 0xc0 <__bad_interrupt>
2e: 00 00 nop
../../../../../crt1/gcrt1.S:78
30: 47 c0 rjmp .+142 ; 0xc0 <__bad_interrupt>
32: 00 00 nop
../../../../../crt1/gcrt1.S:79
34: 45 c0 rjmp .+138 ; 0xc0 <__bad_interrupt>
36: 00 00 nop
../../../../../crt1/gcrt1.S:80
38: 43 c0 rjmp .+134 ; 0xc0 <__bad_interrupt>
3a: 00 00 nop
../../../../../crt1/gcrt1.S:81
3c: 41 c0 rjmp .+130 ; 0xc0 <__bad_interrupt>
3e: 00 00 nop
../../../../../crt1/gcrt1.S:82
40: 3f c0 rjmp .+126 ; 0xc0 <__bad_interrupt>
42: 00 00 nop
../../../../../crt1/gcrt1.S:83
44: 3d c0 rjmp .+122 ; 0xc0 <__bad_interrupt>
46: 00 00 nop
../../../../../crt1/gcrt1.S:84
48: 3b c0 rjmp .+118 ; 0xc0 <__bad_interrupt>
4a: 00 00 nop
../../../../../crt1/gcrt1.S:85
4c: 39 c0 rjmp .+114 ; 0xc0 <__bad_interrupt>
4e: 00 00 nop
../../../../../crt1/gcrt1.S:86
50: 37 c0 rjmp .+110 ; 0xc0 <__bad_interrupt>
52: 00 00 nop
../../../../../crt1/gcrt1.S:87
54: 35 c0 rjmp .+106 ; 0xc0 <__bad_interrupt>
56: 00 00 nop
../../../../../crt1/gcrt1.S:88
58: 33 c0 rjmp .+102 ; 0xc0 <__bad_interrupt>
5a: 00 00 nop
../../../../../crt1/gcrt1.S:89
5c: 31 c0 rjmp .+98 ; 0xc0 <__bad_interrupt>
5e: 00 00 nop
../../../../../crt1/gcrt1.S:90
60: 2f c0 rjmp .+94 ; 0xc0 <__bad_interrupt>
62: 00 00 nop
../../../../../crt1/gcrt1.S:91
64: 2e c0 rjmp .+92 ; 0xc2 <__vector_25>
66: 00 00 nop
../../../../../crt1/gcrt1.S:92
68: 2b c0 rjmp .+86 ; 0xc0 <__bad_interrupt>
6a: 00 00 nop
../../../../../crt1/gcrt1.S:93
6c: 29 c0 rjmp .+82 ; 0xc0 <__bad_interrupt>
6e: 00 00 nop
../../../../../crt1/gcrt1.S:94
70: 27 c0 rjmp .+78 ; 0xc0 <__bad_interrupt>
72: 00 00 nop
../../../../../crt1/gcrt1.S:95
74: 25 c0 rjmp .+74 ; 0xc0 <__bad_interrupt>
76: 00 00 nop
../../../../../crt1/gcrt1.S:96
78: 23 c0 rjmp .+70 ; 0xc0 <__bad_interrupt>
7a: 00 00 nop
../../../../../crt1/gcrt1.S:97
7c: 21 c0 rjmp .+66 ; 0xc0 <__bad_interrupt>
7e: 00 00 nop
../../../../../crt1/gcrt1.S:98
80: 1f c0 rjmp .+62 ; 0xc0 <__bad_interrupt>
82: 00 00 nop
../../../../../crt1/gcrt1.S:99
84: 1d c0 rjmp .+58 ; 0xc0 <__bad_interrupt>
86: 00 00 nop
../../../../../crt1/gcrt1.S:100
88: 1b c0 rjmp .+54 ; 0xc0 <__bad_interrupt>
8a: 00 00 nop
../../../../../crt1/gcrt1.S:101
8c: 19 c0 rjmp .+50 ; 0xc0 <__bad_interrupt>
8e: 00 00 nop
../../../../../crt1/gcrt1.S:102
90: 17 c0 rjmp .+46 ; 0xc0 <__bad_interrupt>
92: 00 00 nop
../../../../../crt1/gcrt1.S:103
94: 15 c0 rjmp .+42 ; 0xc0 <__bad_interrupt>
96: 00 00 nop
../../../../../crt1/gcrt1.S:104
98: 13 c0 rjmp .+38 ; 0xc0 <__bad_interrupt>
9a: 00 00 nop
../../../../../crt1/gcrt1.S:105
9c: 11 c0 rjmp .+34 ; 0xc0 <__bad_interrupt>
...
000000a0 <__ctors_end>:
__trampolines_start():
../../../../../crt1/gcrt1.S:230
a0: 11 24 eor r1, r1
../../../../../crt1/gcrt1.S:231
a2: 1f be out 0x3f, r1 ; 63
../../../../../crt1/gcrt1.S:232
a4: cf ef ldi r28, 0xFF ; 255
../../../../../crt1/gcrt1.S:234
a6: cd bf out 0x3d, r28 ; 61
../../../../../crt1/gcrt1.S:236
a8: df e3 ldi r29, 0x3F ; 63
../../../../../crt1/gcrt1.S:237
aa: de bf out 0x3e, r29 ; 62
000000ac <__do_clear_bss>:
__do_clear_bss():
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avrxmega3/short-calls/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2441
ac: 2c e3 ldi r18, 0x3C ; 60
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avrxmega3/short-calls/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2442
ae: a0 e0 ldi r26, 0x00 ; 0
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avrxmega3/short-calls/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2443
b0: bc e3 ldi r27, 0x3C ; 60
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avrxmega3/short-calls/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2444
b2: 01 c0 rjmp .+2 ; 0xb6 <.do_clear_bss_start>
000000b4 <.do_clear_bss_loop>:
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avrxmega3/short-calls/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2446
b4: 1d 92 st X+, r1
000000b6 <.do_clear_bss_start>:
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avrxmega3/short-calls/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2448
b6: a4 30 cpi r26, 0x04 ; 4
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avrxmega3/short-calls/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2449
b8: b2 07 cpc r27, r18
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avrxmega3/short-calls/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2450
ba: e1 f7 brne .-8 ; 0xb4 <.do_clear_bss_loop>
.do_clear_bss_start():
../../../../../crt1/gcrt1.S:314
bc: 2a d0 rcall .+84 ; 0x112 <main>
../../../../../crt1/gcrt1.S:315
be: 9b c0 rjmp .+310 ; 0x1f6 <_exit>
000000c0 <__bad_interrupt>:
__vector_38():
../../../../../crt1/gcrt1.S:209
c0: 9f cf rjmp .-194 ; 0x0 <__vectors>
000000c2 <__vector_25>:
__vector_25():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:74
#elif defined(MILLIS_USE_TIMERB2)
ISR(TCB2_INT_vect)
#else // fallback or defined(MILLIS_USE_TIMERB3)
ISR(TCB3_INT_vect)
#endif
{
c2: 1f 92 push r1
c4: 0f 92 push r0
c6: 0f b6 in r0, 0x3f ; 63
c8: 0f 92 push r0
ca: 11 24 eor r1, r1
cc: 8f 93 push r24
ce: 9f 93 push r25
d0: af 93 push r26
d2: bf 93 push r27
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:75
timer_millis++;
d4: 80 91 00 3c lds r24, 0x3C00 ; 0x803c00 <__DATA_REGION_ORIGIN__>
d8: 90 91 01 3c lds r25, 0x3C01 ; 0x803c01 <__DATA_REGION_ORIGIN__+0x1>
dc: a0 91 02 3c lds r26, 0x3C02 ; 0x803c02 <__DATA_REGION_ORIGIN__+0x2>
e0: b0 91 03 3c lds r27, 0x3C03 ; 0x803c03 <__DATA_REGION_ORIGIN__+0x3>
e4: 01 96 adiw r24, 0x01 ; 1
e6: a1 1d adc r26, r1
e8: b1 1d adc r27, r1
ea: 80 93 00 3c sts 0x3C00, r24 ; 0x803c00 <__DATA_REGION_ORIGIN__>
ee: 90 93 01 3c sts 0x3C01, r25 ; 0x803c01 <__DATA_REGION_ORIGIN__+0x1>
f2: a0 93 02 3c sts 0x3C02, r26 ; 0x803c02 <__DATA_REGION_ORIGIN__+0x2>
f6: b0 93 03 3c sts 0x3C03, r27 ; 0x803c03 <__DATA_REGION_ORIGIN__+0x3>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:78
/* Clear flag */
_timer->INTFLAGS = TCB_CAPT_bm;
fa: 81 e0 ldi r24, 0x01 ; 1
fc: 80 93 a6 0a sts 0x0AA6, r24 ; 0x800aa6 <__RODATA_PM_OFFSET__+0x7fcaa6>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:79
}
100: bf 91 pop r27
102: af 91 pop r26
104: 9f 91 pop r25
106: 8f 91 pop r24
108: 0f 90 pop r0
10a: 0f be out 0x3f, r0 ; 63
10c: 0f 90 pop r0
10e: 1f 90 pop r1
110: 18 95 reti
00000112 <main>:
main():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:355
#if (F_CPU == 20000000L)
/* No division on clock */
_PROTECTED_WRITE(CLKCTRL_MCLKCTRLB, 0x00);
#elif (F_CPU == 16000000L)
/* No division on clock */
_PROTECTED_WRITE(CLKCTRL_MCLKCTRLB, 0x00);
112: 88 ed ldi r24, 0xD8 ; 216
114: 90 e0 ldi r25, 0x00 ; 0
116: 84 bf out 0x34, r24 ; 52
118: 90 93 61 00 sts 0x0061, r25 ; 0x800061 <__RODATA_PM_OFFSET__+0x7fc061>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:388
/* ADC clock between 50-200 kHz */
#if (F_CPU >= 20000000L) // 20 MHz / 128 = 156.250 kHz
ADC0.CTRLC |= ADC_PRESC_DIV128_gc;
#elif (F_CPU >= 16000000L) // 16 MHz / 128 = 125 kHz
ADC0.CTRLC |= ADC_PRESC_DIV128_gc;
11c: 80 91 02 06 lds r24, 0x0602 ; 0x800602 <__RODATA_PM_OFFSET__+0x7fc602>
120: 86 60 ori r24, 0x06 ; 6
122: 80 93 02 06 sts 0x0602, r24 ; 0x800602 <__RODATA_PM_OFFSET__+0x7fc602>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:402
#else // 128 kHz / 2 = 64 kHz -> This is the closest you can get, the prescaler is 2
ADC0.CTRLC |= ADC_PRESC_DIV2_gc;
#endif
/* Enable ADC */
ADC0.CTRLA |= ADC_ENABLE_bm;
126: 80 91 00 06 lds r24, 0x0600 ; 0x800600 <__RODATA_PM_OFFSET__+0x7fc600>
12a: 81 60 ori r24, 0x01 ; 1
12c: 80 93 00 06 sts 0x0600, r24 ; 0x800600 <__RODATA_PM_OFFSET__+0x7fc600>
analogReference():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring_analog.c:35
{
switch (mode)
{
case EXTERNAL:
case VDD:
ADC0.CTRLC = (ADC0.CTRLC & ~(ADC_REFSEL_gm)) | mode | ADC_SAMPCAP_bm; // Per datasheet, recommended SAMPCAP=1 at ref > 1v - we don't *KNOW* the external reference will be >1v, but it's probably more likely...
130: 80 91 02 06 lds r24, 0x0602 ; 0x800602 <__RODATA_PM_OFFSET__+0x7fc602>
134: 8f 7c andi r24, 0xCF ; 207
136: 80 65 ori r24, 0x50 ; 80
138: 80 93 02 06 sts 0x0602, r24 ; 0x800602 <__RODATA_PM_OFFSET__+0x7fc602>
main():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:407
analogReference(VDD);
#endif
PORTMUX.USARTROUTEA = 0;
13c: 10 92 e2 05 sts 0x05E2, r1 ; 0x8005e2 <__RODATA_PM_OFFSET__+0x7fc5e2>
setup_timers():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:446
void setup_timers()
{
// TYPE A TIMER
// PORTMUX setting for TCA (defined in pins_arduino.h)
PORTMUX.TCAROUTEA = TCA0_PINS;
140: 82 e0 ldi r24, 0x02 ; 2
142: 80 93 e4 05 sts 0x05E4, r24 ; 0x8005e4 <__RODATA_PM_OFFSET__+0x7fc5e4>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:449
// Enable split mode before anything else
TCA0.SPLIT.CTRLD = TCA_SINGLE_SPLITM_bm;
146: 81 e0 ldi r24, 0x01 ; 1
148: 80 93 03 0a sts 0x0A03, r24 ; 0x800a03 <__RODATA_PM_OFFSET__+0x7fca03>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:453
// Period setting, two 8 bit registers
TCA0.SPLIT.LPER =
TCA0.SPLIT.HPER = PWM_TIMER_PERIOD;
14c: 8e ef ldi r24, 0xFE ; 254
14e: 80 93 27 0a sts 0x0A27, r24 ; 0x800a27 <__RODATA_PM_OFFSET__+0x7fca27>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:452
// Enable split mode before anything else
TCA0.SPLIT.CTRLD = TCA_SINGLE_SPLITM_bm;
// Period setting, two 8 bit registers
TCA0.SPLIT.LPER =
152: 80 93 26 0a sts 0x0A26, r24 ; 0x800a26 <__RODATA_PM_OFFSET__+0x7fca26>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:461
TCA0.SPLIT.LCMP0 =
TCA0.SPLIT.LCMP1 =
TCA0.SPLIT.LCMP2 =
TCA0.SPLIT.HCMP0 =
TCA0.SPLIT.HCMP1 =
TCA0.SPLIT.HCMP2 = PWM_TIMER_COMPARE;
156: 80 e8 ldi r24, 0x80 ; 128
158: 80 93 2d 0a sts 0x0A2D, r24 ; 0x800a2d <__RODATA_PM_OFFSET__+0x7fca2d>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:460
// Default duty 50%, will re-assign in analogWrite()
TCA0.SPLIT.LCMP0 =
TCA0.SPLIT.LCMP1 =
TCA0.SPLIT.LCMP2 =
TCA0.SPLIT.HCMP0 =
TCA0.SPLIT.HCMP1 =
15c: 80 93 2b 0a sts 0x0A2B, r24 ; 0x800a2b <__RODATA_PM_OFFSET__+0x7fca2b>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:459
// Default duty 50%, will re-assign in analogWrite()
TCA0.SPLIT.LCMP0 =
TCA0.SPLIT.LCMP1 =
TCA0.SPLIT.LCMP2 =
TCA0.SPLIT.HCMP0 =
160: 80 93 29 0a sts 0x0A29, r24 ; 0x800a29 <__RODATA_PM_OFFSET__+0x7fca29>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:458
TCA0.SPLIT.HPER = PWM_TIMER_PERIOD;
// Default duty 50%, will re-assign in analogWrite()
TCA0.SPLIT.LCMP0 =
TCA0.SPLIT.LCMP1 =
TCA0.SPLIT.LCMP2 =
164: 80 93 2c 0a sts 0x0A2C, r24 ; 0x800a2c <__RODATA_PM_OFFSET__+0x7fca2c>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:457
TCA0.SPLIT.LPER =
TCA0.SPLIT.HPER = PWM_TIMER_PERIOD;
// Default duty 50%, will re-assign in analogWrite()
TCA0.SPLIT.LCMP0 =
TCA0.SPLIT.LCMP1 =
168: 80 93 2a 0a sts 0x0A2A, r24 ; 0x800a2a <__RODATA_PM_OFFSET__+0x7fca2a>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:456
// Period setting, two 8 bit registers
TCA0.SPLIT.LPER =
TCA0.SPLIT.HPER = PWM_TIMER_PERIOD;
// Default duty 50%, will re-assign in analogWrite()
TCA0.SPLIT.LCMP0 =
16c: 80 93 28 0a sts 0x0A28, r24 ; 0x800a28 <__RODATA_PM_OFFSET__+0x7fca28>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:474
#elif F_CPU <= 8000000L
// Use DIV16 prescaler (giving 250kHz clocke on 4MHz, 500kHz clock on 8MHz), enable TCA timer
TCA0.SPLIT.CTRLA = (TCA_SPLIT_CLKSEL_DIV16_gc) | (TCA_SPLIT_ENABLE_bm);
#else
// Use DIV64 prescaler (giving 250kHz clock on 16MHz), enable TCA timer
TCA0.SPLIT.CTRLA = (TCA_SPLIT_CLKSEL_DIV64_gc) | (TCA_SPLIT_ENABLE_bm);
170: 8b e0 ldi r24, 0x0B ; 11
172: 80 93 00 0a sts 0x0A00, r24 ; 0x800a00 <__RODATA_PM_OFFSET__+0x7fca00>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:480
#endif
// TYPE B TIMERS
// Set up routing (defined in pins_arduino.h)
PORTMUX.TCBROUTEA = 0
176: 87 e0 ldi r24, 0x07 ; 7
178: 80 93 e5 05 sts 0x05E5, r24 ; 0x8005e5 <__RODATA_PM_OFFSET__+0x7fc5e5>
main():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:496
| TCB3_PINS
#endif
;
// Start with TCB0
TCB_t *timer_B = (TCB_t *)&TCB0;
17c: e0 e8 ldi r30, 0x80 ; 128
17e: fa e0 ldi r31, 0x0A ; 10
setup_timers():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:513
// Timer B Setup loop for TCB[0:end]
do
{
// 8 bit PWM mode, but do not enable output yet, will do in analogWrite()
timer_B->CTRLB = (TCB_CNTMODE_PWM8_gc);
180: 37 e0 ldi r19, 0x07 ; 7
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:516
// Assign 8-bit period
timer_B->CCMPL = PWM_TIMER_PERIOD;
182: 2e ef ldi r18, 0xFE ; 254
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:519
// default duty 50%, set when output enabled
timer_B->CCMPH = PWM_TIMER_COMPARE;
184: 90 e8 ldi r25, 0x80 ; 128
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:523
// Use TCA clock (250kHz) and enable
// (sync update commented out, might try to synchronize later
timer_B->CTRLA = (TCB_CLKSEL_CLKTCA_gc)
186: 85 e0 ldi r24, 0x05 ; 5
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:513
// Timer B Setup loop for TCB[0:end]
do
{
// 8 bit PWM mode, but do not enable output yet, will do in analogWrite()
timer_B->CTRLB = (TCB_CNTMODE_PWM8_gc);
188: 31 83 std Z+1, r19 ; 0x01
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:516
// Assign 8-bit period
timer_B->CCMPL = PWM_TIMER_PERIOD;
18a: 24 87 std Z+12, r18 ; 0x0c
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:519
// default duty 50%, set when output enabled
timer_B->CCMPH = PWM_TIMER_COMPARE;
18c: 95 87 std Z+13, r25 ; 0x0d
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:523
// Use TCA clock (250kHz) and enable
// (sync update commented out, might try to synchronize later
timer_B->CTRLA = (TCB_CLKSEL_CLKTCA_gc)
18e: 80 83 st Z, r24
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:528
//|(TCB_SYNCUPD_bm)
| (TCB_ENABLE_bm);
// Increment pointer to next TCB instance
timer_B++;
190: 70 96 adiw r30, 0x10 ; 16
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:531
// Stop when pointing to TCB3
} while (timer_B <= timer_B_end);
192: e0 3c cpi r30, 0xC0 ; 192
194: 4a e0 ldi r20, 0x0A ; 10
196: f4 07 cpc r31, r20
198: b9 f7 brne .-18 ; 0x188 <main+0x76>
main():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:416
/********************* TCB for system time tracking **************************/
// BUG: we can compensate for F_CPU by fine tuning value of TIME_TRACKING_TIMER_COUNT
/* Select vanilla 16 bit periodic interrupt mode */
_timer->CTRLB = TCB_CNTMODE_INT_gc;
19a: 10 92 a1 0a sts 0x0AA1, r1 ; 0x800aa1 <__RODATA_PM_OFFSET__+0x7fcaa1>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:419
/* TOP value for overflow every N clock cycles */
_timer->CCMP = TIME_TRACKING_TIMER_COUNT - 1;
19e: 8f e7 ldi r24, 0x7F ; 127
1a0: 9e e3 ldi r25, 0x3E ; 62
1a2: 80 93 ac 0a sts 0x0AAC, r24 ; 0x800aac <__RODATA_PM_OFFSET__+0x7fcaac>
1a6: 90 93 ad 0a sts 0x0AAD, r25 ; 0x800aad <__RODATA_PM_OFFSET__+0x7fcaad>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:422
/* Enable TCB interrupt */
_timer->INTCTRL |= TCB_CAPT_bm;
1aa: 80 91 a5 0a lds r24, 0x0AA5 ; 0x800aa5 <__RODATA_PM_OFFSET__+0x7fcaa5>
1ae: 81 60 ori r24, 0x01 ; 1
1b0: 80 93 a5 0a sts 0x0AA5, r24 ; 0x800aa5 <__RODATA_PM_OFFSET__+0x7fcaa5>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:426
/* Clock selection is F_CPU/N -- which is independent of TCA */
#if TIME_TRACKING_TIMER_DIVIDER == 1
_timer->CTRLA = TCB_CLKSEL_CLKDIV1_gc; /* F_CPU */
1b4: 10 92 a0 0a sts 0x0AA0, r1 ; 0x800aa0 <__RODATA_PM_OFFSET__+0x7fcaa0>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:434
#else
#assert "TIME_TRACKING_TIMER_DIVIDER not supported"
#endif
/* Enable & start */
_timer->CTRLA |= TCB_ENABLE_bm; /* Keep this last before enabling interrupts to ensure tracking as accurate as possible */
1b8: 80 91 a0 0a lds r24, 0x0AA0 ; 0x800aa0 <__RODATA_PM_OFFSET__+0x7fcaa0>
1bc: 81 60 ori r24, 0x01 ; 1
1be: 80 93 a0 0a sts 0x0AA0, r24 ; 0x800aa0 <__RODATA_PM_OFFSET__+0x7fcaa0>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring.c:438
/*************************** ENABLE GLOBAL INTERRUPTS *************************/
sei();
1c2: 78 94 sei
pinMode():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring_digital.c:43
return;
if (mode == OUTPUT)
{
/* Configure direction as output */
port->DIRSET = bit_mask;
1c4: 82 e0 ldi r24, 0x02 ; 2
1c6: 80 93 01 04 sts 0x0401, r24 ; 0x800401 <__RODATA_PM_OFFSET__+0x7fc401>
digitalWrite():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring_digital.c:167
port->OUTTGL = bit_mask;
/* If HIGH OR > TOGGLE */
}
else
{
port->OUTSET = bit_mask;
1ca: 12 e0 ldi r17, 0x02 ; 2
main():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/main.cpp:43
setup();
for (;;)
{
loop();
if (serialEventRun) serialEventRun();
1cc: c0 e0 ldi r28, 0x00 ; 0
1ce: d0 e0 ldi r29, 0x00 ; 0
digitalWrite():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring_digital.c:153
/* Get port */
PORT_t *port = digitalPinToPortStruct(pin);
/* Output direction */
if (port->DIR & bit_mask)
1d0: 80 91 00 04 lds r24, 0x0400 ; 0x800400 <__RODATA_PM_OFFSET__+0x7fc400>
1d4: 81 ff sbrs r24, 1
1d6: 06 c0 rjmp .+12 ; 0x1e4 <main+0xd2>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring_digital.c:167
port->OUTTGL = bit_mask;
/* If HIGH OR > TOGGLE */
}
else
{
port->OUTSET = bit_mask;
1d8: 10 93 05 04 sts 0x0405, r17 ; 0x800405 <__RODATA_PM_OFFSET__+0x7fc405>
main():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/main.cpp:43
1dc: 20 97 sbiw r28, 0x00 ; 0
1de: c1 f3 breq .-16 ; 0x1d0 <main+0xbe>
1e0: 0f df rcall .-482 ; 0x0 <__vectors>
1e2: f6 cf rjmp .-20 ; 0x1d0 <main+0xbe>
digitalWrite():
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring_digital.c:186
/* Calculate where pin control register is */
volatile uint8_t *pin_ctrl_reg = getPINnCTRLregister(port, bit_pos);
/* Save system status and disable interrupts */
uint8_t status = SREG;
1e4: 9f b7 in r25, 0x3f ; 63
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring_digital.c:187
cli();
1e6: f8 94 cli
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring_digital.c:197
*pin_ctrl_reg &= ~PORT_PULLUPEN_bm;
}
else
{
/* Enable pull-up */
*pin_ctrl_reg |= PORT_PULLUPEN_bm;
1e8: 80 91 11 04 lds r24, 0x0411 ; 0x800411 <__RODATA_PM_OFFSET__+0x7fc411>
1ec: 88 60 ori r24, 0x08 ; 8
1ee: 80 93 11 04 sts 0x0411, r24 ; 0x800411 <__RODATA_PM_OFFSET__+0x7fc411>
C:\Users\Martin\AppData\Local\Arduino15\packages\MegaCoreX\hardware\megaavr\1.0.10\cores\coreX-corefiles/wiring_digital.c:201
}
/* Restore system status */
SREG = status;
1f2: 9f bf out 0x3f, r25 ; 63
1f4: f3 cf rjmp .-26 ; 0x1dc <main+0xca>
000001f6 <_exit>:
exit():
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avrxmega3/short-calls/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2278
1f6: f8 94 cli
000001f8 <__stop_program>:
__stop_program():
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avrxmega3/short-calls/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2280
1f8: ff cf rjmp .-2 ; 0x1f8 <__stop_program>

View File

@@ -1,221 +0,0 @@
:1000000050C0000068C0000066C0000064C000006E
:1000100062C0000060C000005EC000005CC0000064
:100020005AC0000058C0000056C0000054C0000074
:1000300052C0000050C000004EC000004CC0000084
:100040004AC0000048C0000046C0000044C0000094
:1000500042C0000040C000003EC000003CC00000A4
:100060003AC0000069C3000036C0000034C0000080
:1000700032C0000030C000002EC000002CC00000C4
:100080002AC0000028C0000026C0000024C00000D4
:1000900022C0000020C000001EC000001CC00000E4
:1000A000C40311241FBECFEFCDBFDFE3DEBF2CE3BF
:1000B000A0E0BCE301C01D92A838B207E1F710E050
:1000C000C1E5D0E003C02197FE01F8D5C035D107C6
:1000D000D1F7B9D30EC694CF00008093C4088091A5
:1000E000C30887FFFCCF8091C4080895282F30E013
:1000F000F901ED57F24B40814F3F09F450C089326E
:1001000058F4F901E85FF24BE081EE2329F0E13089
:1001100099F010F0E63020F1F901E65AF24BE08157
:10012000A0E2EA9FF0011124FC5F8081842321F189
:10013000611120C046830895F901EF5CF24B5081B4
:10014000533008F05F5F7091010A81E090E001C0D8
:10015000880F5A95EAF7809587238093010ADCCFB0
:1001600080E1E89FF0011124E05AF54F81818F7EF4
:100170008183D2CF458308952F5C324BD9018C9176
:10018000309771F08F3F61F07096E80FF11D9FB7C7
:10019000F8948081611107C0877F80839FBF089595
:1001A000F0E0E0E0F4CF8860F8CF8F929F92AF92BA
:1001B000BF92CF92DF92EF92FF920F93CF93DF9394
:1001C0008091853C893210F461E090DF80911C3C85
:1001D000882319F081FF0DC07894DF91CF910F91A2
:1001E000FF90EF90DF90CF90BF90AF909F908F9057
:1001F000089580FFF2CF80901E3C90901F3CA0900D
:10020000203CB090213CC12CD12C7601E0E094013F
:10021000A501B601C701A0E045D581F1217030E00C
:1002200040E050E060E070E080E090E03BD5D1F04D
:10023000B0E0A0E0E03370F4AE2FA695A695A695A9
:1002400080E2A89FD0011124A05FBB4F8E2F877042
:10025000A80FB11DCE2FD0E0CA5ED34C88899C91E7
:10026000892B8C939401A501B601C70101E0FFD44D
:1002700049015A016B017C01EF5FC9CF8090223C9C
:100280009090233CA090243CB090253CC12CD12CD4
:100290007601E0E29401A501B601C701A0E002D514
:1002A00009F49BCF217030E040E050E060E070E066
:1002B00080E090E0F7D4D1F0B0E0A0E0E03370F45B
:1002C000AE2FA695A695A69580E2A89FD0011124F1
:1002D000A05FBB4F8E2F8770A80FB11DCE2FD0E02F
:1002E000CA5ED34C88899C91892B8C939401A5017B
:1002F000B601C70101E0BBD449015A016B017C0181
:10030000EF5FC8CFCF93DF9390E0FC01ED57F24B46
:1003100020812F3F61F0FC01E65AF24BE08130E290
:10032000E39FF0011124FC5F613021F42183DF9110
:10033000CF9108958F5C924BEC01A881AF3F69F09B
:10034000CF014096A80FB92FB11D9FB7F894228313
:100350008C9188608C939FBFEACFB0E0A0E0F5CF8E
:1003600080911B3C811117C010921C3C10921D3CC7
:1003700010921E3C10921F3C1092203C1092213C87
:100380001092223C1092233C1092243C1092253C67
:1003900081E080931B3C8091E3058C7F90911A3C17
:1003A000892B8093E305911119C061E084E0AADFF5
:1003B00061E086E0A7DF8091C10884608093C10876
:1003C0008091C00881628093C0089091143C809114
:1003D000153C9093C0088093C1080895913031F482
:1003E00061E08EE08FDF61E080E1E4CF923019F7C9
:1003F00061E08EE187DF61E080E2DCCF8FB7F894C7
:100400002091103C3091113C4091123C5091133C92
:10041000E091AA0AF091AB0A9091A60A90FF08C059
:100420002F5F3F4F4F4F5F4FE091AA0AF091AB0A09
:100430008FBFA8EEB3E00FD423E0F695E7952A9599
:10044000E1F76E0F7F1F811D911D08958F929F927E
:10045000AF92BF92CF92DF92EF92FF924B015C017D
:10046000CDDF6B017C01A8EEB3E0A5019401F3D3CD
:10047000C60ED71EE81EF91EC616D706E806F906F0
:1004800010F4BCDFF9CFBADF6C157D058E059F0532
:10049000D0F3FF90EF90DF90CF90BF90AF909F9000
:1004A0008F9008958F929F92AF92BF92CF92DF92DA
:1004B000EF92FF920F93CF93DF9380911C3C8823A0
:1004C00019F081FF19C0F89481E38093C00884E09B
:1004D0008093C1088091853C893208F098C060E023
:1004E000DF91CF910F91FF90EF90DF90CF90BF9071
:1004F000AF909F908F90FACD80FFE6CF80901E3C0A
:1005000090901F3CA090203CB090213CC12CD12C5D
:100510007601E0E09401A501B601C701A0E0C2D3D5
:1005200089F1217030E040E050E060E070E080E070
:1005300090E0B8D3D9F0B0E0A0E0E03370F4AE2F93
:10054000A695A695A69580E2A89FD0011124A05F4C
:10055000BB4F8E2F8770A80FB11DCE2FD0E08C918E
:10056000CA5ED34C888B8C91887F8C939401A501B3
:10057000B601C70101E07BD349015A016B017C013F
:10058000EF5FC8CF8090223C9090233CA090243C09
:10059000B090253CC12CD12C7601E0E29401A5015C
:1005A000B601C701A0E07ED309F48ECF217030E000
:1005B00040E050E060E070E080E090E073D3D9F07C
:1005C000B0E0A0E0E03370F4AE2FA695A695A69516
:1005D00080E2A89FD0011124A05FBB4F8E2F8770AF
:1005E000A80FB11DCE2FD0E08C91CA5ED34C888B62
:1005F0008C91887F8C939401A501B601C70101E01D
:1006000036D349015A016B017C01EF5FC7CFDF91FF
:10061000CF910F91FF90EF90DF90CF90BF90AF9070
:100620009F908F900895CF93C82F3CDF83E054DDD7
:100630008C2F52DD80E050DDC82FB7DD8C2FCF919D
:100640000895FF920F931F93CF93DF93C82FF62E39
:10065000172F042F27DF82E03FDD8C2F3DDDCF2DCC
:10066000D12F0C0F1D2F111DC017D10719F0899123
:1006700033DDFACFDF91CF911F910F91FF9095CD90
:100680001F93CF93DF93182FD62FC42F0BDF85E056
:1006900023DD812F21DD8D2F1FDD8C2F1DDDDF91CF
:1006A000CF911F9182CDCF92DF92EF92FF92CF93A5
:1006B000C82F482F60EE8FE0E3DF8FB7F894C0902B
:1006C000103CD090113CE090123CF090133C8FBF56
:1006D0008AE0C80ED11CE11CF11C2FB7F894809160
:1006E000103C9091113CA091123CB091133C2FBF53
:1006F0008C159D05AE05BF0578F48EE094DF807EF5
:10070000C813EBCF81E091E0892790E0CF91FF9073
:10071000EF90DF90CF90089580E0F5CFCF93DF93F7
:10072000D82FC62FBFDE82E0D7DC8D2FD5DC8C2FF3
:10073000D3DCDF91CF9139CD1F920F920FB60F927C
:1007400011248F939F93AF93BF938091103C90910E
:10075000113CA091123CB091133C0196A11DB11D1A
:100760008093103C9093113CA093123CB093133CA7
:1007700081E08093A60ABF91AF919F918F910F90D6
:100780000FBE0F901F901895CF93DF93E4E1FCE329
:10079000C4E0C18381E38083E6E1FCE31582148237
:1007A000DFDDD3E0D093853C61E083E0ABDDFDDCB1
:1007B000E5E5FCE385E190E080839183128213827A
:1007C00081E08483858326E130E0268337831086A9
:1007D0001186828792E0938727E130E0248735876E
:1007E00016861786808BD18B28E130E0228B338BE5
:1007F000148A158A868BC78B2CE130E0208F318FCD
:10080000128E138E848F95E0958F2BE130E0268F2A
:10081000378F10A211A282A396E093A32AE130E0C1
:1008200024A335A316A217A280A797E091A729E1D8
:1008300030E022A733A714A615A686A788E087A7CD
:10084000DF91CF910895CF93DF93CDB7DEB7A9970E
:10085000CDBFDEBF91E088ED84BF909361008091B1
:100860000206856080930206809100068160809375
:100870000006809102068F7C8065809302061092AC
:10088000E20582E08093E4059093030A8EEF809363
:10089000270A8093260A80E880932D0A80932B0AEA
:1008A0008093290A80932C0A80932A0A8093280A2D
:1008B00089E08093000A87E08093E505E0E8FAE0AC
:1008C00037E02EEF90E885E0318324879587808399
:1008D0007096E03C4AE0F407B9F71092A10A8FE362
:1008E0009FE18093AC0A9093AD0A8091A50A816044
:1008F0008093A50A1092A00A8091A00A816080933B
:10090000A00A78942DDD80916000806890E028ED49
:1009100024BF80936000C6DD80ECDEDB46DC6AE04D
:1009200070E080E090E092DDCE0101967C018EE0E7
:10093000D7011D928A95E9F74EE0B70180E381DE89
:100940004EE0B70180E47DDE4EE0B70180E579DE60
:1009500060E080E6E3DE60E080E7E0DE63EA8BE211
:10096000DDDE44E067E680E68BDE41E067E680E7B7
:1009700087DE8CE0E6EFFCE4DE011F9601900D922D
:100980008A95E1F74E01BFE08B0E911CD12CC12C52
:10099000A82C99A698E0B92EF401019111914F016C
:1009A00080E881DE892B61F40230110509F47BC0F7
:1009B000A0F501151105E1F10130110509F479C027
:1009C00080E871DE892B49F460E08AE2A7DE60E905
:1009D00089E2A4DE62E888E2A1DE80E064DE60ED08
:1009E00077E080E090E032DDA5E5CA2EACE3DA2EB8
:1009F000412C512C32014394FE017596EBA3FCA3CC
:100A0000FFE6CF16FDE3DF0609F064C000E010E06A
:100A100001151105E9F3F4DAFBCF0430110509F4EF
:100A200046C008F442C00530110551F688E101C006
:100A300080E0F1E0CF16D104F1F51E8E1D8EBC8E44
:100A40001B8E44E0BE01655E7F4FFBDD4FEFC41A95
:100A5000D40A86E0C816D10409F09ECF1F8E18A2D2
:100A600081E090E089A39AA38E01015E1F4F6E0181
:100A700093E2C90ED11C88E0B82ED8018D909D90CC
:100A80008D0180E810DE892B09F09ACF1E8E1D8E15
:100A9000BC8E1B8E8114910499F08A94892809F0E8
:100AA0008FCF84E20EC088E0C4CF80E1C2CF84E162
:100AB000C0CF84E0BECF1B8E1C8E1E8E1D8EC1CF7C
:100AC00080E244E0BE01655E7F4FBBDDC016D1060B
:100AD000A1F676CF4092003C5092013C6092023CDD
:100AE0007092033C44E04093043C87E48093083CCC
:100AF00091E19093093CA8E0A0930A3CB5E1B09342
:100B00000B3C86E0E2E0FDE4DE011F9601900D92D1
:100B10008A95E1F70A2D19A5F801819091908F012E
:100B20001401220C331CF101E80DF91DE455F24BC0
:100B3000B0808B2D78DD83FD87C01091043C193087
:100B400008F063C04091003C5091013C6091023C30
:100B50007091033CDB01CA018827B7FD8395992773
:100B6000AA27BB27282FDB01CA0188279927AA2794
:100B7000B0748DA39EA3AFA3B8A78FEF9FEFAFEF85
:100B8000BFE1211104C08FEF97E0A0E0B0E0842323
:100B90009523A623B723222309F446C08C839B8385
:100BA000CD01AA27BB27282F220F220F220F207E3C
:100BB000382F33703860232B2A8335E0969587953C
:100BC0003A95E1F789838DA19EA1AFA1B8A5892BA4
:100BD0008A2B8B2BB9F1812F80648D83412F50E0BC
:100BE00068E07CE3CE0106967BD045E0410FF10141
:100BF000E80DF91DE455F24BB701818122DD48E093
:100C000068E08B2D3DDD8B2D0EDD68EE73E080E01E
:100C100090E01CDCF6018081893210F462E072DB26
:100C2000F6E0CF0ED11CECCE9C0193E036952795D3
:100C30009A95E1F729838295880F807E8A831C82AA
:100C40001B82C1CF812FC9CFABA1BCA10A171B0743
:100C500009F062CFDACF38D0A59F900DB49F900DE8
:100C6000A49F800D911D1124089597FD1094002ECE
:100C7000083098F00850232F342F452F562F672F18
:100C8000782F892F912DF4CF159497958795779587
:100C9000679557954795379527950A95AAF7112493
:100CA000002D08950024A7FD00942A173005400563
:100CB000500560057005800590050895EE0FFF1F33
:100CC0000590F491E02D0994A29FB001B39FC0015B
:100CD000A39F01D0B29F700D811D1124911D089515
:100CE000FB01DC0102C001900D9241505040D8F749
:060CF0000895F894FFCF07
:100CF60000000100020003000400050000000100DE
:100D060002000000000000000000000000000005D6
:100D160001010101010100000000000000000000C7
:100D260000000000000000000203000001020304AE
:100D36000506070001020304050001020304050677
:100D46000700010203040506070001020300010271
:100D56000304050600000000000000000101010177
:100D66000101020202020202020203030303030359
:100D7600030304040404050505050505050102042D
:100D86000810204080010204081020010204081007
:100D9600204080010204081020408001020408015E
:0F0DA6000204081020403031364041465051566B
:00000001FF

File diff suppressed because it is too large Load Diff

View File

@@ -1,221 +0,0 @@
#include <SPI.h>;
#include <mcp2515.h>;
struct can_frame _frame;
MCP2515 mcp2515(PIN_PA3);
const byte SoftwareVersionHigh = 1;
const byte SoftwareVersionLow = 0;
const byte HardwareVersionHigh = 2;
const byte HardwareVersionLow = 0;
typedef struct
{
int pin_id;
bool pin_state;
bool is_input;
byte meyPinId;
PinState() {}
void Init(int pin_id, byte meyPinId)
{
this->pin_id = pin_id;
this->pin_state = true;
this->is_input = true;
this->meyPinId = meyPinId;
}
} PinState;
int PinCount = 8;
PinState PinPD2[8];
byte DeviceId[2];
void setup() {
SPI.begin();
PinPD2[0] = PinState();
PinPD2[0].Init(PIN_PC7, (byte) 1);
PinPD2[1] = PinState();
PinPD2[1].Init(PIN_PD0, (byte) 2);
PinPD2[2] = PinState();
PinPD2[2].Init(PIN_PD1, (byte) 3);
PinPD2[3] = PinState();
PinPD2[3].Init(PIN_PD2, (byte) 4);
PinPD2[4] = PinState();
PinPD2[4].Init(PIN_PD6, (byte) 5);
PinPD2[5] = PinState();
PinPD2[5].Init(PIN_PD5, (byte) 6);
PinPD2[6] = PinState();
PinPD2[6].Init(PIN_PD4, (byte) 7);
PinPD2[7] = PinState();
PinPD2[7].Init(PIN_PD3, (byte) 8);
_PROTECTED_WRITE(CLKCTRL.MCLKCTRLA, CLKCTRL.MCLKCTRLA | 1 << 7);
mcp2515.reset();
mcp2515.setBitrate(CAN_500KBPS, MCP_8MHZ); //Sets CAN at speed 500KBPS and Clock 8MHz
mcp2515.setNormalMode();
for (int i = 0; i <= PinCount - 1; i++)
{
pinMode(PinPD2[i].pin_id, INPUT_PULLUP);
PinPD2[i].pin_state = ReadPin(&PinPD2[i]);
}
DeviceId[0] = (SIGROW.SERNUM0 ^
CircularShift(SIGROW.SERNUM2) << 1 ^
CircularShift( CircularShift(SIGROW.SERNUM4)) ^
CircularShift( CircularShift( CircularShift(SIGROW.SERNUM6))) ^
CircularShift( CircularShift( CircularShift( CircularShift(SIGROW.SERNUM8)))));
DeviceId[1] = (SIGROW.SERNUM1 ^
CircularShift(SIGROW.SERNUM3) << 1 ^
CircularShift( CircularShift(SIGROW.SERNUM5)) ^
CircularShift( CircularShift( CircularShift(SIGROW.SERNUM7))) ^
CircularShift( CircularShift( CircularShift( CircularShift(SIGROW.SERNUM9)))));
SendSerialPackage();
}
bool debugFlag = false;
void loop()
{
for (int i = 0; i <= PinCount - 1; i++)
{
if (CheckPinStatus(&PinPD2[i]))
SendSwitchedTriggeredCanPackage(&PinPD2[i]);
}
if (mcp2515.readMessage(&_frame) == MCP2515::ERROR_OK)
{
debugFlag ^= true;
int meyPinId = _frame.data[0];
bool state = _frame.data[1] > 0;
PinState *adressedPin;
for (int i = 0; i <= PinCount - 1; i++)
if (PinPD2[i].meyPinId == meyPinId)
{
adressedPin = &PinPD2[i];
break;
}
if (adressedPin != NULL)
{
if (adressedPin->is_input == true)
{
pinMode(adressedPin->pin_id, OUTPUT);
adressedPin->is_input = false;
}
adressedPin->pin_state = state;
digitalWrite(adressedPin->pin_id, state);
}
}
delay(20);
}
byte CircularShift(byte b)
{
return (b << 1) | (b >> 7 & 1);
}
uint32_t GetDeviceId(uint32_t canFrameId)
{
return canFrameId & 0xFFFF;
}
uint32_t CreateCanId(uint32_t commandId)
{
return ((commandId & 0xFFF) * 0x10000) | ( DeviceId[0] << 8) | (DeviceId[1]) | CAN_EFF_FLAG;
}
void SendSerialPackage()
{
_frame.can_id = CreateCanId(0xFFFF);
_frame.can_dlc = 4;
_frame.data[0] = SoftwareVersionHigh;
_frame.data[1] = SoftwareVersionLow;
_frame.data[2] = HardwareVersionHigh;
_frame.data[3] = HardwareVersionLow;
mcp2515.sendMessage(MCP2515::TXB1, &_frame);
}
void SendSwitchedTriggeredCanPackage(PinState * state)
{
_frame.can_id = CreateCanId(0x050);
_frame.can_dlc = 2;
_frame.data[0] = state->meyPinId;
_frame.data[1] = state->pin_state;
mcp2515.sendMessage(MCP2515::TXB1, &_frame);
}
void SendDoTriggerSwitchCanPackage(uint32_t targetCanId, byte pinId, byte state)
{
_frame.can_id = CreateCanId(0x050);
_frame.can_dlc = 4;
_frame.data[0] = targetCanId & 0xFF;
_frame.data[1] = (targetCanId & 0xFF00) >> 8;
_frame.data[2] = pinId;
_frame.data[3] = state;
mcp2515.sendMessage(MCP2515::TXB1, &_frame);
}
bool ReadPin(PinState * state)
{
if (state->pin_id == PIN_PD2)
return digitalReadFast(PIN_PD2);
else if (state->pin_id == PIN_PC7)
return digitalReadFast(PIN_PC7);
else if (state->pin_id == PIN_PD1)
return digitalReadFast(PIN_PD1);
else if (state->pin_id == PIN_PD0)
return digitalReadFast(PIN_PD0);
else if (state->pin_id == PIN_PD6)
return digitalReadFast(PIN_PD6);
else if (state->pin_id == PIN_PD5)
return digitalReadFast(PIN_PD5);
else if (state->pin_id == PIN_PD4)
return digitalReadFast(PIN_PD4);
else if (state->pin_id == PIN_PD3)
return digitalReadFast(PIN_PD3);
else
return digitalRead(state->pin_id);
}
bool CheckPinStatus(PinState * state)
{
if (!state->is_input)
return false;
bool newValue = ReadPin(state);
if (newValue != state->pin_state)
{
delay(10);
newValue = ReadPin(state);
if (newValue != state->pin_state)
{
state->pin_state = newValue;
return true;
}
}
return false;
}

View File

@@ -0,0 +1 @@
C:\source\Meycan\Switch1\_autosave-Switch1.kicad_sch

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -214,6 +214,7 @@
(net 123 "/CANH4") (net 123 "/CANH4")
(net 124 "/CANL4") (net 124 "/CANL4")
(net 125 "/5VIn") (net 125 "/5VIn")
(net 126 "/5VLDOONOFF")
(footprint "digikey-footprints:SOT-23-3" placed (layer "F.Cu") (footprint "digikey-footprints:SOT-23-3" placed (layer "F.Cu")
(tedit 5D28A5E3) (tstamp 01c62548-5e0c-4671-965b-5ebef38a2d21) (tedit 5D28A5E3) (tstamp 01c62548-5e0c-4671-965b-5ebef38a2d21)
@@ -2908,7 +2909,7 @@
(fp_line (start 1.27 1.27) (end -1.27 1.27) (layer "F.Fab") (width 0.1) (tstamp 899728ad-e826-413a-b33b-b91e91bac565)) (fp_line (start 1.27 1.27) (end -1.27 1.27) (layer "F.Fab") (width 0.1) (tstamp 899728ad-e826-413a-b33b-b91e91bac565))
(fp_line (start 1.27 -1.27) (end 1.27 1.27) (layer "F.Fab") (width 0.1) (tstamp aaa02db3-c67e-4286-8e21-76744aa47e2c)) (fp_line (start 1.27 -1.27) (end 1.27 1.27) (layer "F.Fab") (width 0.1) (tstamp aaa02db3-c67e-4286-8e21-76744aa47e2c))
(pad "1" thru_hole rect (at 0 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) (pad "1" thru_hole rect (at 0 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
(net 1 "/5VLDO") (pinfunction "Pin_1") (pintype "passive") (tstamp b1deaa6f-a2c3-48dc-8451-43d1195f4686)) (net 126 "/5VLDOONOFF") (pinfunction "Pin_1") (pintype "passive") (tstamp b1deaa6f-a2c3-48dc-8451-43d1195f4686))
(model "${KICAD6_3DMODEL_DIR}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_1x01_P2.54mm_Vertical.wrl" (model "${KICAD6_3DMODEL_DIR}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_1x01_P2.54mm_Vertical.wrl"
(offset (xyz 0 0 0)) (offset (xyz 0 0 0))
(scale (xyz 1 1 1)) (scale (xyz 1 1 1))
@@ -3292,6 +3293,55 @@
(net 32 "/TO2") (pinfunction "C") (pintype "passive") (solder_mask_margin 0.07) (tstamp aa27dc2f-337a-4c38-a44b-2ee7534a8d36)) (net 32 "/TO2") (pinfunction "C") (pintype "passive") (solder_mask_margin 0.07) (tstamp aa27dc2f-337a-4c38-a44b-2ee7534a8d36))
) )
(footprint "Connector_PinHeader_2.54mm:PinHeader_2x01_P2.54mm_Vertical" (layer "F.Cu")
(tedit 59FED5CC) (tstamp dc890f03-842d-4035-b059-ec0443684055)
(at 184.404 59.436)
(descr "Through hole straight pin header, 2x01, 2.54mm pitch, double rows")
(tags "Through hole pin header THT 2x01 2.54mm double row")
(property "Sheetfile" "Switch1.kicad_sch")
(property "Sheetname" "")
(path "/366377f0-a55b-44a1-a28b-40d54f0e0078")
(attr through_hole)
(fp_text reference "5V On/Off" (at 1.27 -2.33) (layer "F.SilkS")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp b0832c13-4191-4709-be8c-9d4cf865d6e3)
)
(fp_text value "5VONOFF" (at 1.27 2.33) (layer "F.Fab")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp 66ab0120-cc1e-4389-b140-51e08a421173)
)
(fp_text user "${REFERENCE}" (at 1.27 0 90) (layer "F.Fab")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp be475db9-ea68-48e6-9159-6848e4c66c29)
)
(fp_line (start -1.33 0) (end -1.33 -1.33) (layer "F.SilkS") (width 0.12) (tstamp 4c61b162-ab39-4e30-b41d-bf1d6307f00c))
(fp_line (start -1.33 1.33) (end 3.87 1.33) (layer "F.SilkS") (width 0.12) (tstamp 71854faa-a223-42fd-9ef1-bab7b9198bd7))
(fp_line (start -1.33 -1.33) (end 0 -1.33) (layer "F.SilkS") (width 0.12) (tstamp 75ab1a21-2d1c-4ad2-8bb5-ca8319d1784a))
(fp_line (start 1.27 -1.33) (end 3.87 -1.33) (layer "F.SilkS") (width 0.12) (tstamp 8c500483-e3c5-4b88-b0b7-cf5ba4323ce0))
(fp_line (start 1.27 1.27) (end 1.27 -1.33) (layer "F.SilkS") (width 0.12) (tstamp 8d55e69f-fa44-43c7-9fd3-20200ebf6cf9))
(fp_line (start 3.87 -1.33) (end 3.87 1.33) (layer "F.SilkS") (width 0.12) (tstamp efd3ecb6-0b41-47cb-971f-e8f1a5a76777))
(fp_line (start -1.33 1.27) (end 1.27 1.27) (layer "F.SilkS") (width 0.12) (tstamp f1ead6ac-5ee7-47d3-aa00-8a645df0e63b))
(fp_line (start -1.33 1.27) (end -1.33 1.33) (layer "F.SilkS") (width 0.12) (tstamp fee44bca-e2b4-4949-824f-513e5affb5a2))
(fp_line (start -1.8 -1.8) (end -1.8 1.8) (layer "F.CrtYd") (width 0.05) (tstamp 0132eafb-fc2f-480a-a594-a5299cb45af5))
(fp_line (start 4.35 1.8) (end 4.35 -1.8) (layer "F.CrtYd") (width 0.05) (tstamp c1612ae2-344a-4090-99c4-9e5130eff8b1))
(fp_line (start 4.35 -1.8) (end -1.8 -1.8) (layer "F.CrtYd") (width 0.05) (tstamp d6243403-f815-49bf-8eba-847a58bc51b8))
(fp_line (start -1.8 1.8) (end 4.35 1.8) (layer "F.CrtYd") (width 0.05) (tstamp f2cd9438-87d9-4dc4-aba1-32091e63ff79))
(fp_line (start -1.27 1.27) (end -1.27 0) (layer "F.Fab") (width 0.1) (tstamp 4dded0cc-1400-42f3-bb1f-2579fa5f09a1))
(fp_line (start 3.81 1.27) (end -1.27 1.27) (layer "F.Fab") (width 0.1) (tstamp 682a3f21-e861-4202-be71-411ecd6bb8da))
(fp_line (start 0 -1.27) (end 3.81 -1.27) (layer "F.Fab") (width 0.1) (tstamp 7d4b485b-50f7-46a9-ac69-5cde8759e5f9))
(fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer "F.Fab") (width 0.1) (tstamp 974445b8-55c1-4347-bdb6-c3cf2d74224d))
(fp_line (start -1.27 0) (end 0 -1.27) (layer "F.Fab") (width 0.1) (tstamp 9932b75f-8e81-49da-a7f3-c2bce09018bc))
(pad "1" thru_hole rect (at 0 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
(net 126 "/5VLDOONOFF") (pinfunction "Pin_1") (pintype "passive") (tstamp 279c8d16-e230-4ae2-a6ca-dcd3fa4dab77))
(pad "2" thru_hole oval (at 2.54 0) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask)
(net 1 "/5VLDO") (pinfunction "Pin_2") (pintype "passive") (tstamp b8ea2e08-0357-4769-a6f9-24d54a9583cd))
(model "${KICAD6_3DMODEL_DIR}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_2x01_P2.54mm_Vertical.wrl"
(offset (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)
(footprint "Diode_SMD:D_MiniMELF" placed (layer "F.Cu") (footprint "Diode_SMD:D_MiniMELF" placed (layer "F.Cu")
(tedit 5905D8F5) (tstamp de29ed1e-c6ae-422c-b0d1-197652b8306c) (tedit 5905D8F5) (tstamp de29ed1e-c6ae-422c-b0d1-197652b8306c)
(at 244.856 66.802 -90) (at 244.856 66.802 -90)
@@ -4094,6 +4144,9 @@
(gr_text "1" (at 204.774326 77.266326) (layer "F.SilkS") (tstamp 307ea962-06e6-4965-b781-4ac960686bf1) (gr_text "1" (at 204.774326 77.266326) (layer "F.SilkS") (tstamp 307ea962-06e6-4965-b781-4ac960686bf1)
(effects (font (size 1 1) (thickness 0.15))) (effects (font (size 1 1) (thickness 0.15)))
) )
(gr_text "UPDI" (at 195.58 56.134 90) (layer "F.SilkS") (tstamp 3b6d6bb7-d0e7-4500-a5b2-d6ec3609e7b5)
(effects (font (size 1 1) (thickness 0.15)))
)
(gr_text "H" (at 248.666 129.716) (layer "F.SilkS") (tstamp 3e9ed8b8-af63-44fc-a471-6d5f30734a97) (gr_text "H" (at 248.666 129.716) (layer "F.SilkS") (tstamp 3e9ed8b8-af63-44fc-a471-6d5f30734a97)
(effects (font (size 1 1) (thickness 0.15))) (effects (font (size 1 1) (thickness 0.15)))
) )
@@ -4182,17 +4235,17 @@
(effects (font (size 1 1) (thickness 0.15))) (effects (font (size 1 1) (thickness 0.15)))
) )
(segment (start 179.959 66.421) (end 200.200848 66.421) (width 0.25) (layer "F.Cu") (net 1) (tstamp 01f7fc77-e75d-4a77-af91-0ea2200720c8)) (segment (start 195.008022 66.294) (end 190.246 66.294) (width 0.25) (layer "F.Cu") (net 1) (tstamp 029767b2-2fd2-4343-8e95-4bbc884c01b1))
(segment (start 228.126 87.298) (end 230.09 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp 04d952dc-b582-4ddd-97cb-507f7fe4c2a3)) (segment (start 228.126 87.298) (end 230.09 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp 04d952dc-b582-4ddd-97cb-507f7fe4c2a3))
(segment (start 198.425 109.362) (end 200.55 107.237) (width 0.25) (layer "F.Cu") (net 1) (tstamp 0a277b85-3ab7-4296-aa2c-35f6e532e6d3)) (segment (start 198.425 109.362) (end 200.55 107.237) (width 0.25) (layer "F.Cu") (net 1) (tstamp 0a277b85-3ab7-4296-aa2c-35f6e532e6d3))
(segment (start 226.712 108.346) (end 227.728 109.362) (width 0.25) (layer "F.Cu") (net 1) (tstamp 0d3942ac-c63c-4b67-b85a-fb2fece01205)) (segment (start 226.712 108.346) (end 227.728 109.362) (width 0.25) (layer "F.Cu") (net 1) (tstamp 0d3942ac-c63c-4b67-b85a-fb2fece01205))
(segment (start 210.66099 71.72299) (end 211.582 72.644) (width 0.25) (layer "F.Cu") (net 1) (tstamp 0d87f8c2-253f-4426-8b0e-b41493fe6b64)) (segment (start 210.66099 71.72299) (end 211.582 72.644) (width 0.25) (layer "F.Cu") (net 1) (tstamp 0d87f8c2-253f-4426-8b0e-b41493fe6b64))
(segment (start 228.998 108.126) (end 230.268 108.126) (width 0.25) (layer "F.Cu") (net 1) (tstamp 0e7ebf8a-ce90-44f0-abef-b3edfe454c3c)) (segment (start 228.998 108.126) (end 230.268 108.126) (width 0.25) (layer "F.Cu") (net 1) (tstamp 0e7ebf8a-ce90-44f0-abef-b3edfe454c3c))
(segment (start 241.046 90.776) (end 241.046 89.364) (width 0.25) (layer "F.Cu") (net 1) (tstamp 0ed7d626-47e6-4346-a607-dd2a4542c676)) (segment (start 241.046 90.776) (end 241.046 89.364) (width 0.25) (layer "F.Cu") (net 1) (tstamp 0ed7d626-47e6-4346-a607-dd2a4542c676))
(segment (start 200.200848 66.421) (end 201.128924 67.349076) (width 0.25) (layer "F.Cu") (net 1) (tstamp 0ef6e7ee-df7f-4990-be7e-23c2b712d162))
(segment (start 197.502 105.586) (end 196.42752 106.66048) (width 0.25) (layer "F.Cu") (net 1) (tstamp 15a64a80-be0e-40f3-bdac-f7ed26a5a81c)) (segment (start 197.502 105.586) (end 196.42752 106.66048) (width 0.25) (layer "F.Cu") (net 1) (tstamp 15a64a80-be0e-40f3-bdac-f7ed26a5a81c))
(segment (start 201.128924 67.349076) (end 201.676 67.896152) (width 0.25) (layer "F.Cu") (net 1) (tstamp 15c15674-9b38-4107-a2b0-548152249769)) (segment (start 201.128924 67.349076) (end 201.676 67.896152) (width 0.25) (layer "F.Cu") (net 1) (tstamp 15c15674-9b38-4107-a2b0-548152249769))
(segment (start 212.742 109.362) (end 212.742 109.142) (width 0.25) (layer "F.Cu") (net 1) (tstamp 16b4c0e2-0984-44c2-9b48-21f1afa06570)) (segment (start 212.742 109.362) (end 212.742 109.142) (width 0.25) (layer "F.Cu") (net 1) (tstamp 16b4c0e2-0984-44c2-9b48-21f1afa06570))
(segment (start 200.581848 66.802) (end 195.516022 66.802) (width 0.25) (layer "F.Cu") (net 1) (tstamp 172f0697-ed04-497e-86dd-e51c4ba89a82))
(segment (start 212.304924 72.644) (end 212.832462 72.116462) (width 0.25) (layer "F.Cu") (net 1) (tstamp 17e61578-5fc0-49c7-beaa-8a89eeae370c)) (segment (start 212.304924 72.644) (end 212.832462 72.116462) (width 0.25) (layer "F.Cu") (net 1) (tstamp 17e61578-5fc0-49c7-beaa-8a89eeae370c))
(segment (start 200.66 85.598) (end 200.66 82.296) (width 0.25) (layer "F.Cu") (net 1) (tstamp 1a01d8cd-a175-4c43-8d88-f8e64c0b7a1a)) (segment (start 200.66 85.598) (end 200.66 82.296) (width 0.25) (layer "F.Cu") (net 1) (tstamp 1a01d8cd-a175-4c43-8d88-f8e64c0b7a1a))
(segment (start 200.406 79.502) (end 200.68288 79.502) (width 0.25) (layer "F.Cu") (net 1) (tstamp 1c27df58-4b15-4810-b55d-42aaa6cc9485)) (segment (start 200.406 79.502) (end 200.68288 79.502) (width 0.25) (layer "F.Cu") (net 1) (tstamp 1c27df58-4b15-4810-b55d-42aaa6cc9485))
@@ -4205,11 +4258,11 @@
(segment (start 199.898 77.47) (end 200.59356 77.47) (width 0.25) (layer "F.Cu") (net 1) (tstamp 30302048-76dd-432b-b7f1-38d21e54a61b)) (segment (start 199.898 77.47) (end 200.59356 77.47) (width 0.25) (layer "F.Cu") (net 1) (tstamp 30302048-76dd-432b-b7f1-38d21e54a61b))
(segment (start 244.094 107.95) (end 242.714 109.33) (width 0.25) (layer "F.Cu") (net 1) (tstamp 366749a0-64f8-4d12-92d6-945b3596d78d)) (segment (start 244.094 107.95) (end 242.714 109.33) (width 0.25) (layer "F.Cu") (net 1) (tstamp 366749a0-64f8-4d12-92d6-945b3596d78d))
(segment (start 202.714877 69.815573) (end 203.378301 70.478997) (width 0.25) (layer "F.Cu") (net 1) (tstamp 39a14c87-c2d2-458b-80c5-322ffa367bee)) (segment (start 202.714877 69.815573) (end 203.378301 70.478997) (width 0.25) (layer "F.Cu") (net 1) (tstamp 39a14c87-c2d2-458b-80c5-322ffa367bee))
(segment (start 184.658 65.278) (end 186.944 62.992) (width 0.25) (layer "F.Cu") (net 1) (tstamp 3a694b42-670f-4cf1-ba79-aea0eadc7924))
(segment (start 197.9 87.596) (end 197.9 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp 3d37080b-20b5-4b1c-812b-2be81fafdec3)) (segment (start 197.9 87.596) (end 197.9 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp 3d37080b-20b5-4b1c-812b-2be81fafdec3))
(segment (start 199.136 76.708) (end 199.898 77.47) (width 0.25) (layer "F.Cu") (net 1) (tstamp 4909d1e2-7ce7-473e-a4b0-1d661b846959)) (segment (start 199.136 76.708) (end 199.898 77.47) (width 0.25) (layer "F.Cu") (net 1) (tstamp 4909d1e2-7ce7-473e-a4b0-1d661b846959))
(segment (start 200.66 83.488) (end 202.692 85.52) (width 0.25) (layer "F.Cu") (net 1) (tstamp 51bac0c5-6888-421f-a9f1-c0c1e701510e)) (segment (start 200.66 83.488) (end 202.692 85.52) (width 0.25) (layer "F.Cu") (net 1) (tstamp 51bac0c5-6888-421f-a9f1-c0c1e701510e))
(segment (start 206.415094 75.184) (end 209.308648 72.290446) (width 0.25) (layer "F.Cu") (net 1) (tstamp 55058373-359c-4cb7-abf4-0b79b1fe1ffb)) (segment (start 206.415094 75.184) (end 209.308648 72.290446) (width 0.25) (layer "F.Cu") (net 1) (tstamp 55058373-359c-4cb7-abf4-0b79b1fe1ffb))
(segment (start 174.752 67.691) (end 174.752 98.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp 56cb3ca9-7a28-40a9-859f-7b7fefc10d1d))
(segment (start 202.714877 77.447123) (end 204.978 75.184) (width 0.25) (layer "F.Cu") (net 1) (tstamp 56f88b49-1c0c-44f3-b366-3733543822a4)) (segment (start 202.714877 77.447123) (end 204.978 75.184) (width 0.25) (layer "F.Cu") (net 1) (tstamp 56f88b49-1c0c-44f3-b366-3733543822a4))
(segment (start 226.712 106.602) (end 226.712 108.346) (width 0.25) (layer "F.Cu") (net 1) (tstamp 5a734745-b54d-4c05-acc6-1c3a141294d5)) (segment (start 226.712 106.602) (end 226.712 108.346) (width 0.25) (layer "F.Cu") (net 1) (tstamp 5a734745-b54d-4c05-acc6-1c3a141294d5))
(segment (start 199.136 80.264) (end 197.358 78.486) (width 0.25) (layer "F.Cu") (net 1) (tstamp 5b5ea89d-293f-4f7d-bfbf-7ceb1e7397a1)) (segment (start 199.136 80.264) (end 197.358 78.486) (width 0.25) (layer "F.Cu") (net 1) (tstamp 5b5ea89d-293f-4f7d-bfbf-7ceb1e7397a1))
@@ -4218,11 +4271,13 @@
(segment (start 226.06 90.776) (end 226.06 89.364) (width 0.25) (layer "F.Cu") (net 1) (tstamp 6e0bc62d-ae68-46cf-8cb4-771609bb1237)) (segment (start 226.06 90.776) (end 226.06 89.364) (width 0.25) (layer "F.Cu") (net 1) (tstamp 6e0bc62d-ae68-46cf-8cb4-771609bb1237))
(segment (start 212.852 87.298) (end 212.852 86.282) (width 0.25) (layer "F.Cu") (net 1) (tstamp 71f3fa1d-589b-4562-81e0-c4780286854a)) (segment (start 212.852 87.298) (end 212.852 86.282) (width 0.25) (layer "F.Cu") (net 1) (tstamp 71f3fa1d-589b-4562-81e0-c4780286854a))
(segment (start 230.268 108.126) (end 231.538 106.856) (width 0.25) (layer "F.Cu") (net 1) (tstamp 722c9ee5-8cbb-4adb-8b5c-ae4525d27491)) (segment (start 230.268 108.126) (end 231.538 106.856) (width 0.25) (layer "F.Cu") (net 1) (tstamp 722c9ee5-8cbb-4adb-8b5c-ae4525d27491))
(segment (start 190.246 66.294) (end 186.944 62.992) (width 0.25) (layer "F.Cu") (net 1) (tstamp 758e3af4-c09c-420f-ab5f-722a060a625c))
(segment (start 197.358 77.724) (end 198.374 76.708) (width 0.25) (layer "F.Cu") (net 1) (tstamp 7927abdd-1df9-4dcd-8ead-4fcb6256f43d)) (segment (start 197.358 77.724) (end 198.374 76.708) (width 0.25) (layer "F.Cu") (net 1) (tstamp 7927abdd-1df9-4dcd-8ead-4fcb6256f43d))
(segment (start 200.66 82.296) (end 200.406 82.042) (width 0.25) (layer "F.Cu") (net 1) (tstamp 7dfdc053-30a6-4338-9fe3-9b0cecbff49e)) (segment (start 200.66 82.296) (end 200.406 82.042) (width 0.25) (layer "F.Cu") (net 1) (tstamp 7dfdc053-30a6-4338-9fe3-9b0cecbff49e))
(segment (start 200.406 82.042) (end 200.406 79.502) (width 0.25) (layer "F.Cu") (net 1) (tstamp 80321ef0-d469-488c-8d78-c969b42ed950)) (segment (start 200.406 82.042) (end 200.406 79.502) (width 0.25) (layer "F.Cu") (net 1) (tstamp 80321ef0-d469-488c-8d78-c969b42ed950))
(segment (start 248.212 106.856) (end 246.27 106.856) (width 0.25) (layer "F.Cu") (net 1) (tstamp 8230025e-1396-4f92-8996-17dd84ad1baf)) (segment (start 248.212 106.856) (end 246.27 106.856) (width 0.25) (layer "F.Cu") (net 1) (tstamp 8230025e-1396-4f92-8996-17dd84ad1baf))
(segment (start 200.68288 79.502) (end 202.714877 77.470003) (width 0.25) (layer "F.Cu") (net 1) (tstamp 848cf0bc-b2b7-4ac0-ba86-aae4e739c6ee)) (segment (start 200.68288 79.502) (end 202.714877 77.470003) (width 0.25) (layer "F.Cu") (net 1) (tstamp 848cf0bc-b2b7-4ac0-ba86-aae4e739c6ee))
(segment (start 201.128924 67.349076) (end 200.581848 66.802) (width 0.25) (layer "F.Cu") (net 1) (tstamp 8638974c-6393-4963-be57-1cec8842334d))
(segment (start 201.676 68.776696) (end 202.714877 69.815573) (width 0.25) (layer "F.Cu") (net 1) (tstamp 874962cc-e223-4ebf-a006-7fad3d9ea360)) (segment (start 201.676 68.776696) (end 202.714877 69.815573) (width 0.25) (layer "F.Cu") (net 1) (tstamp 874962cc-e223-4ebf-a006-7fad3d9ea360))
(segment (start 241.698 106.602) (end 241.698 108.346) (width 0.25) (layer "F.Cu") (net 1) (tstamp 87ab3eff-af19-4429-9102-d03cfa3bca68)) (segment (start 241.698 106.602) (end 241.698 108.346) (width 0.25) (layer "F.Cu") (net 1) (tstamp 87ab3eff-af19-4429-9102-d03cfa3bca68))
(segment (start 203 106.856) (end 200.931 106.856) (width 0.25) (layer "F.Cu") (net 1) (tstamp 8b4b3717-33fe-4c4a-81b4-56a2ceb422b5)) (segment (start 203 106.856) (end 200.931 106.856) (width 0.25) (layer "F.Cu") (net 1) (tstamp 8b4b3717-33fe-4c4a-81b4-56a2ceb422b5))
@@ -4235,23 +4290,22 @@
(segment (start 243.312 105.586) (end 242.714 105.586) (width 0.25) (layer "F.Cu") (net 1) (tstamp 9ba6014b-2635-4eee-b1fc-4c6604043b01)) (segment (start 243.312 105.586) (end 242.714 105.586) (width 0.25) (layer "F.Cu") (net 1) (tstamp 9ba6014b-2635-4eee-b1fc-4c6604043b01))
(segment (start 195.834 90.776) (end 195.834 89.662) (width 0.25) (layer "F.Cu") (net 1) (tstamp 9e816909-ed0a-4953-8dfc-227361ae8897)) (segment (start 195.834 90.776) (end 195.834 89.662) (width 0.25) (layer "F.Cu") (net 1) (tstamp 9e816909-ed0a-4953-8dfc-227361ae8897))
(segment (start 226.06 89.364) (end 228.126 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp a06f9fc4-7b75-4ba0-a858-becfe68645e9)) (segment (start 226.06 89.364) (end 228.126 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp a06f9fc4-7b75-4ba0-a858-becfe68645e9))
(segment (start 178.689 67.691) (end 179.959 66.421) (width 0.25) (layer "F.Cu") (net 1) (tstamp a0f10fd0-2952-4203-b30b-b42956d39577))
(segment (start 203.2 76.962) (end 203.378301 76.783699) (width 0.25) (layer "F.Cu") (net 1) (tstamp a4c448ff-3e6d-4198-98d5-e6d073285177)) (segment (start 203.2 76.962) (end 203.378301 76.783699) (width 0.25) (layer "F.Cu") (net 1) (tstamp a4c448ff-3e6d-4198-98d5-e6d073285177))
(segment (start 200.59356 77.47) (end 201.654217 76.409343) (width 0.25) (layer "F.Cu") (net 1) (tstamp aed211ba-a8ad-42c1-81e5-19c0057cb710)) (segment (start 200.59356 77.47) (end 201.654217 76.409343) (width 0.25) (layer "F.Cu") (net 1) (tstamp aed211ba-a8ad-42c1-81e5-19c0057cb710))
(segment (start 210.82 89.33) (end 212.852 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp af66eb4f-7413-440c-8380-5f5d43423e9a)) (segment (start 210.82 89.33) (end 212.852 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp af66eb4f-7413-440c-8380-5f5d43423e9a))
(segment (start 174.752 98.298) (end 183.642 107.188) (width 0.25) (layer "F.Cu") (net 1) (tstamp b09c9b3c-4e0e-4caa-9e99-474c060f4970))
(segment (start 214.85 87.298) (end 212.852 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp b3debad2-f1f8-45fb-9a60-5c7cbd09247d)) (segment (start 214.85 87.298) (end 212.852 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp b3debad2-f1f8-45fb-9a60-5c7cbd09247d))
(segment (start 202.714877 77.470003) (end 202.714877 77.447123) (width 0.25) (layer "F.Cu") (net 1) (tstamp b51ad8a5-6bb2-4bda-9f6b-cf99493ce194)) (segment (start 202.714877 77.470003) (end 202.714877 77.447123) (width 0.25) (layer "F.Cu") (net 1) (tstamp b51ad8a5-6bb2-4bda-9f6b-cf99493ce194))
(segment (start 214.52 108.38) (end 215.79 107.11) (width 0.25) (layer "F.Cu") (net 1) (tstamp b51fa808-1c75-477c-bf4d-1c1c89b4688a)) (segment (start 214.52 108.38) (end 215.79 107.11) (width 0.25) (layer "F.Cu") (net 1) (tstamp b51fa808-1c75-477c-bf4d-1c1c89b4688a))
(segment (start 174.752 67.691) (end 178.689 67.691) (width 0.25) (layer "F.Cu") (net 1) (tstamp b77403ac-3922-4bdd-87de-7c85d84f94af))
(segment (start 195.834 89.662) (end 197.9 87.596) (width 0.25) (layer "F.Cu") (net 1) (tstamp b7ad6fa0-2ddf-4699-a98e-d089959ed4ce)) (segment (start 195.834 89.662) (end 197.9 87.596) (width 0.25) (layer "F.Cu") (net 1) (tstamp b7ad6fa0-2ddf-4699-a98e-d089959ed4ce))
(segment (start 204.978 75.184) (end 206.415094 75.184) (width 0.25) (layer "F.Cu") (net 1) (tstamp b7f16300-a5e7-416f-90a2-394a50ee4705)) (segment (start 204.978 75.184) (end 206.415094 75.184) (width 0.25) (layer "F.Cu") (net 1) (tstamp b7f16300-a5e7-416f-90a2-394a50ee4705))
(segment (start 198.374 76.708) (end 199.136 76.708) (width 0.25) (layer "F.Cu") (net 1) (tstamp b87d1e41-f52c-424c-9358-16e05422cf43)) (segment (start 198.374 76.708) (end 199.136 76.708) (width 0.25) (layer "F.Cu") (net 1) (tstamp b87d1e41-f52c-424c-9358-16e05422cf43))
(segment (start 212.852 86.282) (end 212.09 85.52) (width 0.25) (layer "F.Cu") (net 1) (tstamp b9a04b71-ef78-4fcd-afa6-dfca6c9a3f84)) (segment (start 212.852 86.282) (end 212.09 85.52) (width 0.25) (layer "F.Cu") (net 1) (tstamp b9a04b71-ef78-4fcd-afa6-dfca6c9a3f84))
(segment (start 195.516022 66.802) (end 195.008022 66.294) (width 0.25) (layer "F.Cu") (net 1) (tstamp ba280263-cf94-461f-bddf-1b7b5326545e))
(segment (start 242.714 105.586) (end 241.698 106.602) (width 0.25) (layer "F.Cu") (net 1) (tstamp c25653f5-2f85-4c29-83d2-fcaaa045348b)) (segment (start 242.714 105.586) (end 241.698 106.602) (width 0.25) (layer "F.Cu") (net 1) (tstamp c25653f5-2f85-4c29-83d2-fcaaa045348b))
(segment (start 241.698 108.346) (end 242.714 109.362) (width 0.25) (layer "F.Cu") (net 1) (tstamp c3676919-7ec6-46ff-bebb-82578cedeb82)) (segment (start 241.698 108.346) (end 242.714 109.362) (width 0.25) (layer "F.Cu") (net 1) (tstamp c3676919-7ec6-46ff-bebb-82578cedeb82))
(segment (start 213.504 108.38) (end 214.52 108.38) (width 0.25) (layer "F.Cu") (net 1) (tstamp c833caea-647d-4200-9c3c-c51854d3d605)) (segment (start 213.504 108.38) (end 214.52 108.38) (width 0.25) (layer "F.Cu") (net 1) (tstamp c833caea-647d-4200-9c3c-c51854d3d605))
(segment (start 198.1 105.586) (end 197.502 105.586) (width 0.25) (layer "F.Cu") (net 1) (tstamp c96e2272-38c8-4343-8b10-982eaa29c76a)) (segment (start 198.1 105.586) (end 197.502 105.586) (width 0.25) (layer "F.Cu") (net 1) (tstamp c96e2272-38c8-4343-8b10-982eaa29c76a))
(segment (start 186.944 62.992) (end 186.944 59.436) (width 0.25) (layer "F.Cu") (net 1) (tstamp cae0343e-9397-48ef-abec-5a67b2cbee95))
(segment (start 245.076 87.298) (end 243.112 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp cb4c090c-fcf6-4436-91d9-c69d11582549)) (segment (start 245.076 87.298) (end 243.112 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp cb4c090c-fcf6-4436-91d9-c69d11582549))
(segment (start 211.582 72.644) (end 212.304924 72.644) (width 0.25) (layer "F.Cu") (net 1) (tstamp cba29ba1-e440-4b40-abb7-e21b489bd0ea)) (segment (start 211.582 72.644) (end 212.304924 72.644) (width 0.25) (layer "F.Cu") (net 1) (tstamp cba29ba1-e440-4b40-abb7-e21b489bd0ea))
(segment (start 209.876104 71.72299) (end 210.66099 71.72299) (width 0.25) (layer "F.Cu") (net 1) (tstamp ccc76803-7b9e-42f2-b464-79acb31b5816)) (segment (start 209.876104 71.72299) (end 210.66099 71.72299) (width 0.25) (layer "F.Cu") (net 1) (tstamp ccc76803-7b9e-42f2-b464-79acb31b5816))
@@ -4259,6 +4313,7 @@
(segment (start 228.126 87.298) (end 228.126 86.316) (width 0.25) (layer "F.Cu") (net 1) (tstamp d51a3dfa-451a-4c63-8975-c0a5e196b61e)) (segment (start 228.126 87.298) (end 228.126 86.316) (width 0.25) (layer "F.Cu") (net 1) (tstamp d51a3dfa-451a-4c63-8975-c0a5e196b61e))
(segment (start 197.358 78.486) (end 197.358 77.724) (width 0.25) (layer "F.Cu") (net 1) (tstamp d57c7c1c-c8c4-4426-aa5c-edbd96073d87)) (segment (start 197.358 78.486) (end 197.358 77.724) (width 0.25) (layer "F.Cu") (net 1) (tstamp d57c7c1c-c8c4-4426-aa5c-edbd96073d87))
(segment (start 199.864 86.394) (end 200.66 85.598) (width 0.25) (layer "F.Cu") (net 1) (tstamp d95e37f1-453f-4c5e-8948-624f8c2f2735)) (segment (start 199.864 86.394) (end 200.66 85.598) (width 0.25) (layer "F.Cu") (net 1) (tstamp d95e37f1-453f-4c5e-8948-624f8c2f2735))
(segment (start 184.658 107.188) (end 184.658 65.278) (width 0.25) (layer "F.Cu") (net 1) (tstamp d9ad62b5-daa9-4a0a-a73f-9fcbea0fc2cb))
(segment (start 213.13 105.586) (end 212.488 105.586) (width 0.25) (layer "F.Cu") (net 1) (tstamp df833c79-0c48-4983-9d05-9d503a5d26af)) (segment (start 213.13 105.586) (end 212.488 105.586) (width 0.25) (layer "F.Cu") (net 1) (tstamp df833c79-0c48-4983-9d05-9d503a5d26af))
(segment (start 211.472 106.602) (end 211.472 108.6) (width 0.25) (layer "F.Cu") (net 1) (tstamp e1c2587f-98a3-42dd-84bf-4cba2315415a)) (segment (start 211.472 106.602) (end 211.472 108.6) (width 0.25) (layer "F.Cu") (net 1) (tstamp e1c2587f-98a3-42dd-84bf-4cba2315415a))
(segment (start 209.308648 72.290446) (end 209.876104 71.72299) (width 0.25) (layer "F.Cu") (net 1) (tstamp e366add0-d339-4475-9ef9-fea35fb60bd4)) (segment (start 209.308648 72.290446) (end 209.876104 71.72299) (width 0.25) (layer "F.Cu") (net 1) (tstamp e366add0-d339-4475-9ef9-fea35fb60bd4))
@@ -4270,7 +4325,6 @@
(segment (start 243.112 87.298) (end 243.112 86.062) (width 0.25) (layer "F.Cu") (net 1) (tstamp e9a4e05c-7e3b-4734-ab3e-651df9cb4c56)) (segment (start 243.112 87.298) (end 243.112 86.062) (width 0.25) (layer "F.Cu") (net 1) (tstamp e9a4e05c-7e3b-4734-ab3e-651df9cb4c56))
(segment (start 227.728 109.362) (end 227.762 109.362) (width 0.25) (layer "F.Cu") (net 1) (tstamp e9fd4616-1d47-4ec4-88da-4905f339ec13)) (segment (start 227.728 109.362) (end 227.762 109.362) (width 0.25) (layer "F.Cu") (net 1) (tstamp e9fd4616-1d47-4ec4-88da-4905f339ec13))
(segment (start 212.488 105.586) (end 211.472 106.602) (width 0.25) (layer "F.Cu") (net 1) (tstamp ee7206df-e6b5-474d-af1a-6f4284d3113a)) (segment (start 212.488 105.586) (end 211.472 106.602) (width 0.25) (layer "F.Cu") (net 1) (tstamp ee7206df-e6b5-474d-af1a-6f4284d3113a))
(segment (start 183.642 107.188) (end 184.658 107.188) (width 0.25) (layer "F.Cu") (net 1) (tstamp eec27055-24a2-49a4-9cbb-e9cd896eb4bd))
(segment (start 197.9 87.298) (end 199.864 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp f13c3501-a735-4b04-bf95-eb4bc07e9a36)) (segment (start 197.9 87.298) (end 199.864 87.298) (width 0.25) (layer "F.Cu") (net 1) (tstamp f13c3501-a735-4b04-bf95-eb4bc07e9a36))
(segment (start 200.931 106.856) (end 200.677 107.11) (width 0.25) (layer "F.Cu") (net 1) (tstamp f525e739-00b8-445f-8837-7441a8433dea)) (segment (start 200.931 106.856) (end 200.677 107.11) (width 0.25) (layer "F.Cu") (net 1) (tstamp f525e739-00b8-445f-8837-7441a8433dea))
(segment (start 231.538 106.856) (end 233.226 106.856) (width 0.25) (layer "F.Cu") (net 1) (tstamp f8514eba-e108-48bf-a102-23c17227e658)) (segment (start 231.538 106.856) (end 233.226 106.856) (width 0.25) (layer "F.Cu") (net 1) (tstamp f8514eba-e108-48bf-a102-23c17227e658))
@@ -4326,6 +4380,7 @@
(segment (start 241.006 120.788) (end 240.46 121.334) (width 0.25) (layer "F.Cu") (net 9) (tstamp 12ebb556-4c67-4578-8cb3-bf44af3a0f7e)) (segment (start 241.006 120.788) (end 240.46 121.334) (width 0.25) (layer "F.Cu") (net 9) (tstamp 12ebb556-4c67-4578-8cb3-bf44af3a0f7e))
(segment (start 241.632 104.316) (end 240.936 105.012) (width 0.25) (layer "F.Cu") (net 9) (tstamp 136b2a42-4b50-427b-ad44-d7f86ca16e15)) (segment (start 241.632 104.316) (end 240.936 105.012) (width 0.25) (layer "F.Cu") (net 9) (tstamp 136b2a42-4b50-427b-ad44-d7f86ca16e15))
(segment (start 251.46 73.914) (end 251.46 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp 183fed84-3216-4504-8493-87f6b4cedab3)) (segment (start 251.46 73.914) (end 251.46 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp 183fed84-3216-4504-8493-87f6b4cedab3))
(segment (start 176.814 56.933) (end 176.814 59.473) (width 0.25) (layer "F.Cu") (net 9) (tstamp 18c3697c-0cf5-4934-b99b-2047f1a47678))
(segment (start 192.278 112.643) (end 195.882 116.247) (width 0.25) (layer "F.Cu") (net 9) (tstamp 19a22f97-88a7-4208-bebc-565f01cba1ea)) (segment (start 192.278 112.643) (end 195.882 116.247) (width 0.25) (layer "F.Cu") (net 9) (tstamp 19a22f97-88a7-4208-bebc-565f01cba1ea))
(segment (start 194.691 68.834) (end 199.644 68.834) (width 0.25) (layer "F.Cu") (net 9) (tstamp 1a3683de-2572-4ac6-bb00-ad246ba12ab1)) (segment (start 194.691 68.834) (end 199.644 68.834) (width 0.25) (layer "F.Cu") (net 9) (tstamp 1a3683de-2572-4ac6-bb00-ad246ba12ab1))
(segment (start 208.987107 71.936893) (end 210.292462 70.631538) (width 0.25) (layer "F.Cu") (net 9) (tstamp 1bc3cfea-cc9b-40de-87e8-74f776f8dedf)) (segment (start 208.987107 71.936893) (end 210.292462 70.631538) (width 0.25) (layer "F.Cu") (net 9) (tstamp 1bc3cfea-cc9b-40de-87e8-74f776f8dedf))
@@ -4334,13 +4389,14 @@
(segment (start 226.160666 113.029334) (end 227.728 111.462) (width 0.25) (layer "F.Cu") (net 9) (tstamp 1ef9fe18-d3f7-47b0-befb-bda226413bbc)) (segment (start 226.160666 113.029334) (end 227.728 111.462) (width 0.25) (layer "F.Cu") (net 9) (tstamp 1ef9fe18-d3f7-47b0-befb-bda226413bbc))
(segment (start 230.886 73.406) (end 230.886 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp 20ff8620-144a-44d1-8f31-d29bc37dad30)) (segment (start 230.886 73.406) (end 230.886 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp 20ff8620-144a-44d1-8f31-d29bc37dad30))
(segment (start 198.921076 78.017076) (end 200.753592 78.017076) (width 0.25) (layer "F.Cu") (net 9) (tstamp 2dc06a29-ec6d-4075-8e8f-62593ec66ad5)) (segment (start 198.921076 78.017076) (end 200.753592 78.017076) (width 0.25) (layer "F.Cu") (net 9) (tstamp 2dc06a29-ec6d-4075-8e8f-62593ec66ad5))
(segment (start 179.832 65.532) (end 192.278 65.532) (width 0.25) (layer "F.Cu") (net 9) (tstamp 30ad7c83-9b4e-4ec0-85a6-76e6c17a60f1))
(segment (start 209.28 105.062) (end 210.726 105.062) (width 0.25) (layer "F.Cu") (net 9) (tstamp 33ea7695-f4ca-4085-a238-d0d91ce45f79)) (segment (start 209.28 105.062) (end 210.726 105.062) (width 0.25) (layer "F.Cu") (net 9) (tstamp 33ea7695-f4ca-4085-a238-d0d91ce45f79))
(segment (start 251.206 101.522) (end 251.206 100.076) (width 0.25) (layer "F.Cu") (net 9) (tstamp 3668ed0c-21c7-4e00-a0e6-fa38972d4400)) (segment (start 251.206 101.522) (end 251.206 100.076) (width 0.25) (layer "F.Cu") (net 9) (tstamp 3668ed0c-21c7-4e00-a0e6-fa38972d4400))
(segment (start 211.472 104.316) (end 210.71 105.078) (width 0.25) (layer "F.Cu") (net 9) (tstamp 3889d54f-67cb-4a8d-ab22-c9c19e05c144)) (segment (start 211.472 104.316) (end 210.71 105.078) (width 0.25) (layer "F.Cu") (net 9) (tstamp 3889d54f-67cb-4a8d-ab22-c9c19e05c144))
(segment (start 239.014 104.648) (end 240.714 106.348) (width 0.25) (layer "F.Cu") (net 9) (tstamp 3c9585c0-6109-4e30-8968-ed54e8aebb1c)) (segment (start 239.014 104.648) (end 240.714 106.348) (width 0.25) (layer "F.Cu") (net 9) (tstamp 3c9585c0-6109-4e30-8968-ed54e8aebb1c))
(segment (start 178.054 54.991) (end 190.119 54.991) (width 0.25) (layer "F.Cu") (net 9) (tstamp 40c3366d-b537-4c14-81c5-8d6456314c70))
(segment (start 195.882 120.366) (end 195.882 118.247) (width 0.25) (layer "F.Cu") (net 9) (tstamp 40fbd9e8-4a9a-41b2-b8ac-fb34a4f7387b)) (segment (start 195.882 120.366) (end 195.882 118.247) (width 0.25) (layer "F.Cu") (net 9) (tstamp 40fbd9e8-4a9a-41b2-b8ac-fb34a4f7387b))
(segment (start 176.754 118.835) (end 176.754 116.295) (width 0.25) (layer "F.Cu") (net 9) (tstamp 41459bae-3b52-437a-a9c5-03bfdc7c853e)) (segment (start 176.754 118.835) (end 176.754 116.295) (width 0.25) (layer "F.Cu") (net 9) (tstamp 41459bae-3b52-437a-a9c5-03bfdc7c853e))
(segment (start 190.119 54.991) (end 193.04 57.912) (width 0.25) (layer "F.Cu") (net 9) (tstamp 44fe118c-df6a-4571-8549-44a76d664481))
(segment (start 220.98 96.696) (end 224.536 93.14) (width 0.25) (layer "F.Cu") (net 9) (tstamp 4567b957-efdd-4595-9111-b51aea3b3675)) (segment (start 220.98 96.696) (end 224.536 93.14) (width 0.25) (layer "F.Cu") (net 9) (tstamp 4567b957-efdd-4595-9111-b51aea3b3675))
(segment (start 222.504 73.406) (end 222.504 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp 49d6bd1a-48ac-459a-80d8-ffb27304b9c7)) (segment (start 222.504 73.406) (end 222.504 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp 49d6bd1a-48ac-459a-80d8-ffb27304b9c7))
(segment (start 225.75448 104.95352) (end 225.75448 106.54352) (width 0.25) (layer "F.Cu") (net 9) (tstamp 4d1e2d0d-c1c5-4aea-8d5f-e8a396c9a1b2)) (segment (start 225.75448 104.95352) (end 225.75448 106.54352) (width 0.25) (layer "F.Cu") (net 9) (tstamp 4d1e2d0d-c1c5-4aea-8d5f-e8a396c9a1b2))
@@ -4369,6 +4425,7 @@
(segment (start 212.09 121.334) (end 224.890666 121.334) (width 0.25) (layer "F.Cu") (net 9) (tstamp 7a47adde-75da-4358-9a11-8eee267e3660)) (segment (start 212.09 121.334) (end 224.890666 121.334) (width 0.25) (layer "F.Cu") (net 9) (tstamp 7a47adde-75da-4358-9a11-8eee267e3660))
(segment (start 236.22 96.696) (end 236.22 100.076) (width 0.25) (layer "F.Cu") (net 9) (tstamp 7b48acfa-1316-4a4f-8dfa-ea4d11dab33d)) (segment (start 236.22 96.696) (end 236.22 100.076) (width 0.25) (layer "F.Cu") (net 9) (tstamp 7b48acfa-1316-4a4f-8dfa-ea4d11dab33d))
(segment (start 219.788 103.046) (end 222.172 103.046) (width 0.25) (layer "F.Cu") (net 9) (tstamp 7c3930bf-95a6-4dfc-86bb-486227e46e08)) (segment (start 219.788 103.046) (end 222.172 103.046) (width 0.25) (layer "F.Cu") (net 9) (tstamp 7c3930bf-95a6-4dfc-86bb-486227e46e08))
(segment (start 193.04 57.912) (end 193.04 59.436) (width 0.25) (layer "F.Cu") (net 9) (tstamp 7c5ccf4d-7832-4e92-8d7c-9b231abd8027))
(segment (start 236.22 100.076) (end 236.22 101.854) (width 0.25) (layer "F.Cu") (net 9) (tstamp 7e508637-b1ca-4d31-8588-344c252bc88b)) (segment (start 236.22 100.076) (end 236.22 101.854) (width 0.25) (layer "F.Cu") (net 9) (tstamp 7e508637-b1ca-4d31-8588-344c252bc88b))
(segment (start 205.994 98.22) (end 205.994 100.076) (width 0.25) (layer "F.Cu") (net 9) (tstamp 7f1b3e1c-68ca-4337-8e4c-7275129b9296)) (segment (start 205.994 98.22) (end 205.994 100.076) (width 0.25) (layer "F.Cu") (net 9) (tstamp 7f1b3e1c-68ca-4337-8e4c-7275129b9296))
(segment (start 249.682 103.046) (end 251.206 101.522) (width 0.25) (layer "F.Cu") (net 9) (tstamp 82831eaa-7633-44bf-b66a-61c375ed2cf2)) (segment (start 249.682 103.046) (end 251.206 101.522) (width 0.25) (layer "F.Cu") (net 9) (tstamp 82831eaa-7633-44bf-b66a-61c375ed2cf2))
@@ -4384,6 +4441,7 @@
(segment (start 241.012 87.298) (end 239.776 88.534) (width 0.25) (layer "F.Cu") (net 9) (tstamp 9121c641-4cf0-4733-bac7-d3c6d1db3287)) (segment (start 241.012 87.298) (end 239.776 88.534) (width 0.25) (layer "F.Cu") (net 9) (tstamp 9121c641-4cf0-4733-bac7-d3c6d1db3287))
(segment (start 194.564 88.534) (end 195.8 87.298) (width 0.25) (layer "F.Cu") (net 9) (tstamp 91c74227-3058-4ba8-94b3-b8a77d1f17e4)) (segment (start 194.564 88.534) (end 195.8 87.298) (width 0.25) (layer "F.Cu") (net 9) (tstamp 91c74227-3058-4ba8-94b3-b8a77d1f17e4))
(segment (start 208.788 88.822) (end 210.312 87.298) (width 0.25) (layer "F.Cu") (net 9) (tstamp 92262d49-3869-48c9-84c7-97bb33078a55)) (segment (start 208.788 88.822) (end 210.312 87.298) (width 0.25) (layer "F.Cu") (net 9) (tstamp 92262d49-3869-48c9-84c7-97bb33078a55))
(segment (start 176.814 56.933) (end 176.814 56.231) (width 0.25) (layer "F.Cu") (net 9) (tstamp 95dda84c-9852-44f9-bcc4-39c462b5f263))
(segment (start 207.993988 72.898) (end 204.724 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp 9812bfab-3466-4b28-980d-e2b314ac93a8)) (segment (start 207.993988 72.898) (end 204.724 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp 9812bfab-3466-4b28-980d-e2b314ac93a8))
(segment (start 225.439714 74.788286) (end 226.568 73.66) (width 0.25) (layer "F.Cu") (net 9) (tstamp 98725f66-5f4f-440d-b52e-b1ae87376214)) (segment (start 225.439714 74.788286) (end 226.568 73.66) (width 0.25) (layer "F.Cu") (net 9) (tstamp 98725f66-5f4f-440d-b52e-b1ae87376214))
(segment (start 202.007771 76.762897) (end 202.928781 75.841887) (width 0.25) (layer "F.Cu") (net 9) (tstamp 99e8ccf7-fc27-4962-9a09-c1d55ca58f51)) (segment (start 202.007771 76.762897) (end 202.928781 75.841887) (width 0.25) (layer "F.Cu") (net 9) (tstamp 99e8ccf7-fc27-4962-9a09-c1d55ca58f51))
@@ -4402,7 +4460,6 @@
(segment (start 201.026198 68.834) (end 199.644 68.834) (width 0.25) (layer "F.Cu") (net 9) (tstamp b354cef1-6f97-4b27-ac68-f699cb498f13)) (segment (start 201.026198 68.834) (end 199.644 68.834) (width 0.25) (layer "F.Cu") (net 9) (tstamp b354cef1-6f97-4b27-ac68-f699cb498f13))
(segment (start 195.199 108.761) (end 193.929 107.491) (width 0.25) (layer "F.Cu") (net 9) (tstamp b7108fe0-9b9a-4498-ab4e-b1ace8ccd647)) (segment (start 195.199 108.761) (end 193.929 107.491) (width 0.25) (layer "F.Cu") (net 9) (tstamp b7108fe0-9b9a-4498-ab4e-b1ace8ccd647))
(segment (start 236.22 101.854) (end 237.49 103.124) (width 0.25) (layer "F.Cu") (net 9) (tstamp b9c4710f-616c-425e-9a6f-60f189fbaf04)) (segment (start 236.22 101.854) (end 237.49 103.124) (width 0.25) (layer "F.Cu") (net 9) (tstamp b9c4710f-616c-425e-9a6f-60f189fbaf04))
(segment (start 176.814 62.514) (end 179.832 65.532) (width 0.25) (layer "F.Cu") (net 9) (tstamp bbdcaffd-7e6c-450a-a957-26163efd5b65))
(segment (start 222.25 103.124) (end 223.52 104.394) (width 0.25) (layer "F.Cu") (net 9) (tstamp bf46dba9-6c0c-4ed5-a56b-eaf8eadf2a87)) (segment (start 222.25 103.124) (end 223.52 104.394) (width 0.25) (layer "F.Cu") (net 9) (tstamp bf46dba9-6c0c-4ed5-a56b-eaf8eadf2a87))
(segment (start 204.724 103.046) (end 203 103.046) (width 0.25) (layer "F.Cu") (net 9) (tstamp bf7d5e18-305e-4c72-9aaa-15cd26a945f5)) (segment (start 204.724 103.046) (end 203 103.046) (width 0.25) (layer "F.Cu") (net 9) (tstamp bf7d5e18-305e-4c72-9aaa-15cd26a945f5))
(segment (start 233.837142 74.772858) (end 234.95 73.66) (width 0.25) (layer "F.Cu") (net 9) (tstamp c0e9486b-7479-45bd-beec-96dcf4343105)) (segment (start 233.837142 74.772858) (end 234.95 73.66) (width 0.25) (layer "F.Cu") (net 9) (tstamp c0e9486b-7479-45bd-beec-96dcf4343105))
@@ -4430,7 +4487,6 @@
(segment (start 197.182 121.334) (end 196.85 121.334) (width 0.25) (layer "F.Cu") (net 9) (tstamp e216487c-48c4-479d-adec-6ddf24e30a29)) (segment (start 197.182 121.334) (end 196.85 121.334) (width 0.25) (layer "F.Cu") (net 9) (tstamp e216487c-48c4-479d-adec-6ddf24e30a29))
(segment (start 224.07952 104.95352) (end 223.52 104.394) (width 0.25) (layer "F.Cu") (net 9) (tstamp e350131e-878d-4622-98b4-97d58fbcba82)) (segment (start 224.07952 104.95352) (end 223.52 104.394) (width 0.25) (layer "F.Cu") (net 9) (tstamp e350131e-878d-4622-98b4-97d58fbcba82))
(segment (start 204.478614 96.442) (end 199.136 96.442) (width 0.25) (layer "F.Cu") (net 9) (tstamp e4bb49ac-fa32-41a4-a9f3-0f33f87233fe)) (segment (start 204.478614 96.442) (end 199.136 96.442) (width 0.25) (layer "F.Cu") (net 9) (tstamp e4bb49ac-fa32-41a4-a9f3-0f33f87233fe))
(segment (start 176.814 56.933) (end 176.814 62.514) (width 0.25) (layer "F.Cu") (net 9) (tstamp e5a8d70d-176f-49e4-a157-80c9c518f539))
(segment (start 247.65 73.406) (end 247.65 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp e7bbb0f8-f2c9-4ea7-b7ea-deeb8756d0b9)) (segment (start 247.65 73.406) (end 247.65 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp e7bbb0f8-f2c9-4ea7-b7ea-deeb8756d0b9))
(segment (start 211.021333 120.265333) (end 212.09 121.334) (width 0.25) (layer "F.Cu") (net 9) (tstamp ea562a98-d03f-44ed-ae6a-53dfcde3f7a8)) (segment (start 211.021333 120.265333) (end 212.09 121.334) (width 0.25) (layer "F.Cu") (net 9) (tstamp ea562a98-d03f-44ed-ae6a-53dfcde3f7a8))
(segment (start 250.632 74.742) (end 251.46 73.914) (width 0.25) (layer "F.Cu") (net 9) (tstamp ebee42a0-909e-4885-bd7c-18d5cf195519)) (segment (start 250.632 74.742) (end 251.46 73.914) (width 0.25) (layer "F.Cu") (net 9) (tstamp ebee42a0-909e-4885-bd7c-18d5cf195519))
@@ -4446,6 +4502,7 @@
(segment (start 243.586 73.406) (end 243.586 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp f64d18d6-7342-4713-83d3-0415e442c503)) (segment (start 243.586 73.406) (end 243.586 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp f64d18d6-7342-4713-83d3-0415e442c503))
(segment (start 208.955095 71.936893) (end 208.987107 71.936893) (width 0.25) (layer "F.Cu") (net 9) (tstamp f78d9aca-8c4c-47d6-aa83-bb47e4080a0b)) (segment (start 208.955095 71.936893) (end 208.987107 71.936893) (width 0.25) (layer "F.Cu") (net 9) (tstamp f78d9aca-8c4c-47d6-aa83-bb47e4080a0b))
(segment (start 208.955095 71.936893) (end 207.993988 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp f8b462bf-3ba3-43f9-88c8-18e1c0c65205)) (segment (start 208.955095 71.936893) (end 207.993988 72.898) (width 0.25) (layer "F.Cu") (net 9) (tstamp f8b462bf-3ba3-43f9-88c8-18e1c0c65205))
(segment (start 176.814 56.231) (end 178.054 54.991) (width 0.25) (layer "F.Cu") (net 9) (tstamp f977245f-f4d9-440b-a2f9-816217ab52e8))
(segment (start 239.014 104.648) (end 239.378 105.012) (width 0.25) (layer "F.Cu") (net 9) (tstamp fa976bf9-224f-483a-ac43-35b9303ecef2)) (segment (start 239.014 104.648) (end 239.378 105.012) (width 0.25) (layer "F.Cu") (net 9) (tstamp fa976bf9-224f-483a-ac43-35b9303ecef2))
(segment (start 179.253 121.334) (end 176.754 118.835) (width 0.25) (layer "F.Cu") (net 9) (tstamp fbbd47ed-15aa-4bce-9448-7ca571053e6b)) (segment (start 179.253 121.334) (end 176.754 118.835) (width 0.25) (layer "F.Cu") (net 9) (tstamp fbbd47ed-15aa-4bce-9448-7ca571053e6b))
(segment (start 239.378 105.012) (end 240.936 105.012) (width 0.25) (layer "F.Cu") (net 9) (tstamp fcc1d8c6-cd1e-4220-9f5d-1a055cb4b514)) (segment (start 239.378 105.012) (end 240.936 105.012) (width 0.25) (layer "F.Cu") (net 9) (tstamp fcc1d8c6-cd1e-4220-9f5d-1a055cb4b514))
@@ -4989,6 +5046,11 @@
(segment (start 199.74 121.412) (end 198.422 120.094) (width 0.4) (layer "B.Cu") (net 125) (tstamp e8790856-5c3b-47f6-8275-cbc62734cb2d)) (segment (start 199.74 121.412) (end 198.422 120.094) (width 0.4) (layer "B.Cu") (net 125) (tstamp e8790856-5c3b-47f6-8275-cbc62734cb2d))
(segment (start 211.504 121.412) (end 243 121.412) (width 0.4) (layer "B.Cu") (net 125) (tstamp e99ca35a-2fb9-4057-ad0e-d93b7ceeae49)) (segment (start 211.504 121.412) (end 243 121.412) (width 0.4) (layer "B.Cu") (net 125) (tstamp e99ca35a-2fb9-4057-ad0e-d93b7ceeae49))
(segment (start 228.700666 119.963334) (end 228.700666 116.254) (width 0.4) (layer "B.Cu") (net 125) (tstamp f0e49b22-bf96-4204-b382-2030bd125027)) (segment (start 228.700666 119.963334) (end 228.700666 116.254) (width 0.4) (layer "B.Cu") (net 125) (tstamp f0e49b22-bf96-4204-b382-2030bd125027))
(segment (start 182.499 64.516) (end 184.404 62.611) (width 0.25) (layer "F.Cu") (net 126) (tstamp 14f444ce-2e50-464c-8d8c-47652e6942d3))
(segment (start 184.404 62.611) (end 184.404 59.436) (width 0.25) (layer "F.Cu") (net 126) (tstamp 3741448b-f71f-4645-885d-2ffa127e025f))
(segment (start 176.149 64.516) (end 182.499 64.516) (width 0.25) (layer "F.Cu") (net 126) (tstamp acf9894f-4879-49c7-a87d-48ea5ab5af01))
(segment (start 174.752 67.691) (end 174.752 65.913) (width 0.25) (layer "F.Cu") (net 126) (tstamp c1aff609-b7b2-4ce7-975b-fb94c8076438))
(segment (start 174.752 65.913) (end 176.149 64.516) (width 0.25) (layer "F.Cu") (net 126) (tstamp c946496b-3682-43c6-8346-1e84e72471d4))
(zone (net 9) (net_name "/GND") (layer "F.Cu") (tstamp 06c692b9-a744-477e-9400-f5a5c63122c9) (hatch edge 0.508) (zone (net 9) (net_name "/GND") (layer "F.Cu") (tstamp 06c692b9-a744-477e-9400-f5a5c63122c9) (hatch edge 0.508)
(connect_pads (clearance 0.508)) (connect_pads (clearance 0.508))

View File

@@ -1953,6 +1953,10 @@
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid 9f6875e8-f512-417e-97ea-321c4b8ab19c) (uuid 9f6875e8-f512-417e-97ea-321c4b8ab19c)
) )
(bus_entry (at 110.49 73.66) (size 2.54 2.54)
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid a167b4e0-aff8-43cb-a2a0-efe301157ac2)
)
(bus_entry (at 318.77 170.815) (size 2.54 2.54) (bus_entry (at 318.77 170.815) (size 2.54 2.54)
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid a66439e9-43de-4a68-a196-e3dbdf9cebeb) (uuid a66439e9-43de-4a68-a196-e3dbdf9cebeb)
@@ -2133,6 +2137,10 @@
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid e791ba8b-4e90-458a-b97d-4a7270a8bdc7) (uuid e791ba8b-4e90-458a-b97d-4a7270a8bdc7)
) )
(bus_entry (at 107.95 73.66) (size 2.54 2.54)
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid e7aa2c76-ecad-4491-be61-c48344af1cb8)
)
(bus_entry (at 422.91 170.815) (size 2.54 2.54) (bus_entry (at 422.91 170.815) (size 2.54 2.54)
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid eb068410-ebbd-447b-9df5-f26335483799) (uuid eb068410-ebbd-447b-9df5-f26335483799)
@@ -2291,6 +2299,10 @@
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid 0a2fbd4b-bd78-4a40-a408-4130e16b7e47) (uuid 0a2fbd4b-bd78-4a40-a408-4130e16b7e47)
) )
(wire (pts (xy 107.95 67.31) (xy 107.95 73.66))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 0a3925b5-a8a5-482d-88d5-01ee28450af6)
)
(wire (pts (xy 251.46 210.185) (xy 250.19 210.185)) (wire (pts (xy 251.46 210.185) (xy 250.19 210.185))
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid 0a55ed22-27b5-40f1-84d5-b57e31d560d5) (uuid 0a55ed22-27b5-40f1-84d5-b57e31d560d5)
@@ -2862,6 +2874,11 @@
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid 3b8f100d-1764-49dd-a5c6-e7169207cdd8) (uuid 3b8f100d-1764-49dd-a5c6-e7169207cdd8)
) )
(bus (pts (xy 110.49 76.2) (xy 113.03 76.2))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 3bbec552-b8b3-49e6-9261-9b3f351b0214)
)
(wire (pts (xy 248.92 95.25) (xy 248.92 96.52)) (wire (pts (xy 248.92 95.25) (xy 248.92 96.52))
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid 3bc124d7-f8fe-46e4-bade-3eb6c8f4abd7) (uuid 3bc124d7-f8fe-46e4-bade-3eb6c8f4abd7)
@@ -3241,6 +3258,11 @@
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid 65a075e7-2b98-49ef-b105-7c6945abe096) (uuid 65a075e7-2b98-49ef-b105-7c6945abe096)
) )
(wire (pts (xy 110.49 67.31) (xy 110.49 73.66))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid 670f8d1a-935a-411a-bbd9-2cc63e618ac6)
)
(bus (pts (xy 55.88 151.13) (xy 58.42 151.13)) (bus (pts (xy 55.88 151.13) (xy 58.42 151.13))
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid 67347c74-d530-427c-9cb5-e3de24570b11) (uuid 67347c74-d530-427c-9cb5-e3de24570b11)
@@ -4223,6 +4245,11 @@
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid dd8f8b68-94cf-477b-b6ef-48ca0ef1971a) (uuid dd8f8b68-94cf-477b-b6ef-48ca0ef1971a)
) )
(bus (pts (xy 113.03 76.2) (xy 137.16 76.2))
(stroke (width 0) (type default) (color 0 0 0 0))
(uuid ddb1a549-e9b0-49f1-ab79-483620bdc39a)
)
(wire (pts (xy 79.375 248.92) (xy 87.63 248.92)) (wire (pts (xy 79.375 248.92) (xy 87.63 248.92))
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid dde4fcda-0328-4560-9e8e-6b9ea6e44eb1) (uuid dde4fcda-0328-4560-9e8e-6b9ea6e44eb1)
@@ -4535,7 +4562,7 @@
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid f7d1b4c2-136e-484d-95b1-492fbfa4bbd9) (uuid f7d1b4c2-136e-484d-95b1-492fbfa4bbd9)
) )
(bus (pts (xy 85.09 76.2) (xy 137.16 76.2)) (bus (pts (xy 85.09 76.2) (xy 110.49 76.2))
(stroke (width 0) (type default) (color 0 0 0 0)) (stroke (width 0) (type default) (color 0 0 0 0))
(uuid f84511ff-9f2d-4601-82ba-26c4e1a602ac) (uuid f84511ff-9f2d-4601-82ba-26c4e1a602ac)
) )
@@ -4661,6 +4688,10 @@
(effects (font (size 1.27 1.27)) (justify left bottom)) (effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 095de476-b620-45d0-ab23-93b0f781e3de) (uuid 095de476-b620-45d0-ab23-93b0f781e3de)
) )
(label "5VLDOONOFF" (at 107.95 73.66 90)
(effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 0d574d7b-e4be-4932-ae14-44a4b08e91ad)
)
(label "OSC" (at 293.37 189.865 90) (label "OSC" (at 293.37 189.865 90)
(effects (font (size 1.27 1.27)) (justify left bottom)) (effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 15c277e9-5b77-4381-9622-16fe8f4d1c17) (uuid 15c277e9-5b77-4381-9622-16fe8f4d1c17)
@@ -4725,7 +4756,7 @@
(effects (font (size 1.27 1.27)) (justify left bottom)) (effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 34a4b9bb-7e51-4950-a63b-b81e6d058f38) (uuid 34a4b9bb-7e51-4950-a63b-b81e6d058f38)
) )
(label "5VLDO" (at 82.55 73.66 90) (label "5VLDOONOFF" (at 82.55 73.66 90)
(effects (font (size 1.27 1.27)) (justify left bottom)) (effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 36ae8b5e-208f-4981-b689-8bbeeb1e7a61) (uuid 36ae8b5e-208f-4981-b689-8bbeeb1e7a61)
) )
@@ -4853,6 +4884,10 @@
(effects (font (size 1.27 1.27)) (justify left bottom)) (effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 76ee13e5-e42d-430e-a386-1317d4b0313b) (uuid 76ee13e5-e42d-430e-a386-1317d4b0313b)
) )
(label "5VLDO" (at 110.49 73.66 90)
(effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 7af18ce9-8b72-40a3-9130-28c4a26a19c3)
)
(label "TI8" (at 359.41 111.76 270) (label "TI8" (at 359.41 111.76 270)
(effects (font (size 1.27 1.27)) (justify right bottom)) (effects (font (size 1.27 1.27)) (justify right bottom))
(uuid 7c09869e-acbf-4700-a13a-c7048b170924) (uuid 7c09869e-acbf-4700-a13a-c7048b170924)
@@ -5510,6 +5545,25 @@
(pin "2" (uuid 16e158f9-1756-4736-88c4-064b2a49e634)) (pin "2" (uuid 16e158f9-1756-4736-88c4-064b2a49e634))
) )
(symbol (lib_id "Connector:Conn_01x02_Female") (at 107.95 62.23 90) (unit 1)
(in_bom yes) (on_board yes)
(uuid 366377f0-a55b-44a1-a28b-40d54f0e0078)
(property "Reference" "J13" (id 0) (at 111.76 61.5949 90)
(effects (font (size 1.27 1.27)) (justify right))
)
(property "Value" "" (id 1) (at 109.22 59.69 90)
(effects (font (size 1.27 1.27)) (justify right))
)
(property "Footprint" "Connector_PinHeader_2.54mm:PinHeader_2x01_P2.54mm_Vertical" (id 2) (at 107.95 62.23 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "~" (id 3) (at 107.95 62.23 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid a3f615cd-70fc-411f-b70d-5482ccf6b0e3))
(pin "2" (uuid 7afd0d29-e94d-4bc3-aa13-9ad59224592d))
)
(symbol (lib_id "Device:C") (at 116.84 129.54 0) (unit 1) (symbol (lib_id "Device:C") (at 116.84 129.54 0) (unit 1)
(in_bom yes) (on_board yes) (fields_autoplaced) (in_bom yes) (on_board yes) (fields_autoplaced)
(uuid 46c2e290-7d57-4b2e-aaad-d34453bb089a) (uuid 46c2e290-7d57-4b2e-aaad-d34453bb089a)
@@ -6988,6 +7042,9 @@
(path "/130b8d97-84bf-49f0-8f83-80a1750f718c" (path "/130b8d97-84bf-49f0-8f83-80a1750f718c"
(reference "J12") (unit 1) (value "Conn_01x01_Male") (footprint "Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical") (reference "J12") (unit 1) (value "Conn_01x01_Male") (footprint "Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical")
) )
(path "/366377f0-a55b-44a1-a28b-40d54f0e0078"
(reference "J13") (unit 1) (value "5VONOFF") (footprint "Connector_PinHeader_2.54mm:PinHeader_2x01_P2.54mm_Vertical")
)
(path "/d1b91e74-7ffd-4b1a-8200-c679bfd9dd26" (path "/d1b91e74-7ffd-4b1a-8200-c679bfd9dd26"
(reference "JP1") (unit 1) (value "Jumper_2_Open") (footprint "Connector_PinHeader_2.54mm:PinHeader_2x01_P2.54mm_Vertical") (reference "JP1") (unit 1) (value "Jumper_2_Open") (footprint "Connector_PinHeader_2.54mm:PinHeader_2x01_P2.54mm_Vertical")
) )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

75
unbenannt.kicad_prl Normal file
View File

@@ -0,0 +1,75 @@
{
"board": {
"active_layer": 0,
"active_layer_preset": "All Copper Layers",
"auto_track_width": false,
"hidden_nets": [],
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
"pads": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 1.0
},
"ratsnest_display_mode": 0,
"selection_filter": {
"dimensions": true,
"footprints": true,
"graphics": true,
"keepouts": true,
"lockedItems": false,
"otherItems": true,
"pads": true,
"text": true,
"tracks": true,
"vias": true,
"zones": true
},
"visible_items": [
0,
1,
2,
3,
4,
5,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
32,
33,
34,
35,
36
],
"visible_layers": "fffffff_ffffffff",
"zone_display_mode": 0
},
"meta": {
"filename": "unbenannt.kicad_prl",
"version": 3
},
"project": {
"files": []
}
}

420
unbenannt.kicad_pro Normal file
View File

@@ -0,0 +1,420 @@
{
"board": {
"design_settings": {
"defaults": {
"board_outline_line_width": 0.09999999999999999,
"copper_line_width": 0.19999999999999998,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.049999999999999996,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": false,
"text_position": 0,
"units_format": 1
},
"fab_line_width": 0.09999999999999999,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.15,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 0.0,
"height": 0.95,
"width": 0.8
},
"silk_line_width": 0.15,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.15,
"silk_text_upright": false,
"zones": {
"45_degree_only": false,
"min_clearance": 0.508
}
},
"diff_pair_dimensions": [],
"drc_exclusions": [],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"copper_edge_clearance": "error",
"courtyards_overlap": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint_type_mismatch": "error",
"hole_clearance": "error",
"hole_near_hole": "error",
"invalid_outline": "error",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "error",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_dangling": "warning",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zone_has_empty_net": "error",
"zones_intersect": "error"
},
"rules": {
"allow_blind_buried_vias": false,
"allow_microvias": false,
"max_error": 0.005,
"min_clearance": 0.0,
"min_copper_edge_clearance": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.19999999999999998,
"min_microvia_drill": 0.09999999999999999,
"min_silk_clearance": 0.0,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.19999999999999998,
"min_via_annular_width": 0.049999999999999996,
"min_via_diameter": 0.39999999999999997,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0,
"use_height_for_length_calcs": true
},
"track_widths": [],
"via_dimensions": [],
"zones_allow_external_fillets": false,
"zones_use_no_outline": true
},
"layer_presets": []
},
"boards": [],
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_label_syntax": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"extra_units": "error",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"lib_symbol_issues": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"similar_labels": "warning",
"unannotated": "error",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "unbenannt.kicad_pro",
"version": 1
},
"net_settings": {
"classes": [
{
"bus_width": 12.0,
"clearance": 0.2,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"line_style": 0,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.25,
"via_diameter": 0.8,
"via_drill": 0.4,
"wire_width": 6.0
}
],
"meta": {
"version": 2
},
"net_colors": null
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"specctra_dsn": "",
"step": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"drawing": {
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"ngspice": {
"fix_include_paths": true,
"fix_passive_vals": false,
"meta": {
"version": 0
},
"model_mode": 0,
"workbook_filename": ""
},
"page_layout_descr_file": "",
"plot_directory": "",
"spice_adjust_passive_values": false,
"spice_external_command": "spice \"%I\"",
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"9538e4ed-27e6-4c37-b989-9859dc0d49e8",
""
]
],
"text_variables": {}
}