-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It's now looking more workable
- Loading branch information
Showing
21 changed files
with
271 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
namespace skullOS.API | ||
{ | ||
public class Runner | ||
{ | ||
public Task StartWebAPI(string[] args) | ||
{ | ||
var builder = WebApplication.CreateBuilder(args); | ||
|
||
// Add services to the container. | ||
|
||
builder.Services.AddControllers(); | ||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle | ||
builder.Services.AddEndpointsApiExplorer(); | ||
builder.Services.AddSwaggerGen(); | ||
builder.WebHost.UseUrls("http://*:5000;https://*:5001"); | ||
|
||
|
||
var app = builder.Build(); | ||
|
||
// Configure the HTTP request pipeline. | ||
if (app.Environment.IsDevelopment()) | ||
{ | ||
app.UseSwagger(); | ||
app.UseSwaggerUI(); | ||
} | ||
if (!app.Environment.IsDevelopment()) | ||
{ | ||
app.UseHttpsRedirection(); | ||
} | ||
|
||
|
||
app.UseAuthorization(); | ||
|
||
|
||
app.MapControllers(); | ||
|
||
return app.RunAsync(); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace skullOS.Core | ||
{ | ||
public class SkullLogger | ||
{ | ||
string filepath; | ||
public SkullLogger() | ||
{ | ||
string fileName = DateTime.Now.ToString("yyyyMMddHHmmss"); | ||
filepath = FileManager.GetSkullDirectory() + @"\" + fileName + ".txt"; | ||
} | ||
|
||
|
||
public void LogMessage(string message) | ||
{ | ||
#if DEBUG | ||
Console.WriteLine(message); | ||
#endif | ||
File.AppendAllText(filepath, message); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace skullOS.Modules | ||
namespace skullOS.Modules | ||
{ | ||
internal class Downlink | ||
public class Downlink : Module, IDownlinkModule | ||
{ | ||
public override void OnAction(string[] args) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override void OnEnable(string[] args) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
public override string ToString() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace skullOS.Modules | ||
{ | ||
internal interface IDownlinkModule | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace skullOS.Modules | ||
{ | ||
internal interface IPropModule | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace skullOS.Modules | ||
{ | ||
internal interface IQrCodeReaderModule | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace skullOS.Modules.Interfaces | ||
{ | ||
internal interface IUplinkModule | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace skullOS.Modules | ||
namespace skullOS.Modules | ||
{ | ||
internal class Prop | ||
public class Prop : Module, IPropModule | ||
{ | ||
public override void OnAction(string[] args) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override void OnEnable(string[] args) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
public override string ToString() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace skullOS.Modules | ||
namespace skullOS.Modules | ||
{ | ||
internal class QrCodeReader | ||
public class QrCodeReader : Module, IQrCodeReaderModule | ||
{ | ||
public override void OnAction(string[] args) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override void OnEnable(string[] args) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
public override string ToString() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using skullOS.Modules.Interfaces; | ||
|
||
namespace skullOS.Modules | ||
{ | ||
internal class Uplink | ||
public class Uplink : Module, IUplinkModule | ||
{ | ||
public override void OnAction(string[] args) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override void OnEnable(string[] args) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
public override string ToString() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Camera(Image)=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
Camera = True | ||
Output = True | ||
Interlink = True | ||
Downlink = True | ||
Uplink = True | ||
Prop = True | ||
QrCodeReader = True | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using skullOS.Modules; | ||
using System.Device.Gpio; | ||
|
||
namespace skullOS | ||
{ | ||
public class DeviceManager | ||
{ | ||
Task apiStatus; | ||
List<Module> Modules; | ||
GpioController Controller; | ||
|
||
public DeviceManager(GpioController gpio) | ||
{ | ||
Controller = gpio; | ||
} | ||
|
||
public void AttachApi(Task apiTask) | ||
{ | ||
apiStatus = apiTask; | ||
} | ||
|
||
public void AttachModules(List<Module> modules) | ||
{ | ||
Modules = modules; | ||
} | ||
|
||
|
||
} | ||
} |
Oops, something went wrong.