Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

C# API again #129

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode/
*.o
cpp/bin/*
cpp/lib/*
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
path = python
url = https://github.com/rhempel/ev3dev-lang-python
branch = master
[submodule "csharp"]
path = csharp
url = https://github.com/pgrudzien12/ev3dev-lang-csharp
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ We currently have libraries for the following languages here:
- Lua
- Node.JS
- Python
- .NET (C#)

Each binding complies with our universal language binding specification, which also serves as high-level documentation for our wrappers.
10 changes: 10 additions & 0 deletions autogen/autogen-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
],
"templateDir": "cpp/templates/"
},
"csharp": {
"files": [
"csharp/src/ev3dev/Drivers.cs",
"csharp/src/ev3dev/ev3dev.MotorCommands.cs",
"csharp/src/ev3dev/ev3dev.InfraredSensorModes.cs",
"csharp/src/ev3dev/ev3dev.SystemProperties.cs",
"csharp/src/ev3dev/ev3dev.PropertyValues.cs"
],
"templateDir": "csharp/templates/"
},
"python": {
"files": [
"python/ev3dev/core.py",
Expand Down
5 changes: 4 additions & 1 deletion autogen/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var cStyleAutogenEnd = "//~autogen";

exports.autogenFenceComments = {
'.ts': { start: cStyleAutogenStart, end: cStyleAutogenEnd },
'.cs': { start: cStyleAutogenStart, end: cStyleAutogenEnd },
'.vala': { start: cStyleAutogenStart, end: cStyleAutogenEnd },
'.cpp': { start: cStyleAutogenStart, end: cStyleAutogenEnd },
'.h': { start: cStyleAutogenStart, end: cStyleAutogenEnd },
Expand All @@ -23,7 +24,9 @@ exports.extraLiquidFilters = {
});
}

if(typeof input == 'string')
if(!input)
return "undefined";
else if(typeof input == 'string')
return camelCaseSingle(input);
else
return input.map(camelCaseSingle);
Expand Down
1 change: 1 addition & 0 deletions csharp
Submodule csharp added at f89c68