Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lora
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
MONICA
Lora Gateway
Lora
Compare revisions
cb9d8824d7e466b94341b97f5050a01e5a5f616a to d6796cf4eb4e9514c3fc386b21d2ca9930c694ac
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
monica/lora-gateway/lora
Select target project
No results found
d6796cf4eb4e9514c3fc386b21d2ca9930c694ac
Select Git revision
Branches
master
Tags
v1.6.0
v1.6.1
v1.7.0
v1.8.0
v1.8.1
v1.8.2
v1.8.3
v1.8.4
Swap
Target
monica/lora-gateway/lora
Select target project
monica/lora-gateway/lora
1 result
cb9d8824d7e466b94341b97f5050a01e5a5f616a
Select Git revision
Branches
master
Tags
v1.6.0
v1.6.1
v1.7.0
v1.8.0
v1.8.1
v1.8.2
v1.8.3
v1.8.4
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
[1.8.4] Fixing a bug related to threaded working with data
· ac6f4e23
philip.schell
authored
5 years ago
ac6f4e23
Changelog also
· d6796cf4
philip.schell
authored
5 years ago
d6796cf4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG
+3
-1
3 additions, 1 deletion
CHANGELOG
Lora/LoraController.cs
+20
-17
20 additions, 17 deletions
Lora/LoraController.cs
Lora/Properties/AssemblyInfo.cs
+54
-53
54 additions, 53 deletions
Lora/Properties/AssemblyInfo.cs
Lora/lib/IC880ALora.cs
+10
-1
10 additions, 1 deletion
Lora/lib/IC880ALora.cs
with
87 additions
and
72 deletions
CHANGELOG
View file @
d6796cf4
...
@@ -10,4 +10,6 @@
...
@@ -10,4 +10,6 @@
1.7.0 Add Parsing for new Statusformat and Panic Packet
1.7.0 Add Parsing for new Statusformat and Panic Packet
1.8.0 Add field that indicates when the last gps position was recieved, change all times to UTC
1.8.0 Add field that indicates when the last gps position was recieved, change all times to UTC
1.8.1 Add Hostname to MQTT, so you can see from witch device the data is recieved
1.8.1 Add Hostname to MQTT, so you can see from witch device the data is recieved
1.8.2 Bugfix, create also an event for sending normal loradata when update panic
1.8.2 Bugfix, create also an event for sending normal loradata when update panic
\ No newline at end of file
1.8.3 Refactoring and make using threads on event occours
1.8.4 Fixing a bug related to threaded working with data
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Lora/LoraController.cs
View file @
d6796cf4
...
@@ -10,6 +10,7 @@ namespace Fraunhofer.Fit.Iot.Lora {
...
@@ -10,6 +10,7 @@ namespace Fraunhofer.Fit.Iot.Lora {
public
class
LoraController
:
IDisposable
{
public
class
LoraController
:
IDisposable
{
private
LoraConnector
loraconnector
;
private
LoraConnector
loraconnector
;
private
readonly
Dictionary
<
String
,
String
>
settings
;
private
readonly
Dictionary
<
String
,
String
>
settings
;
private
readonly
Object
lockReceivePacket
=
new
Object
();
public
delegate
void
UpdateDataEvent
(
Object
sender
,
DataUpdateEvent
e
);
public
delegate
void
UpdateDataEvent
(
Object
sender
,
DataUpdateEvent
e
);
public
delegate
void
UpdatePanicEvent
(
Object
sender
,
PanicUpdateEvent
e
);
public
delegate
void
UpdatePanicEvent
(
Object
sender
,
PanicUpdateEvent
e
);
...
@@ -84,23 +85,25 @@ namespace Fraunhofer.Fit.Iot.Lora {
...
@@ -84,23 +85,25 @@ namespace Fraunhofer.Fit.Iot.Lora {
}
}
}
}
if
(
trackerName
!=
""
)
{
if
(
trackerName
!=
""
)
{
if
(!
this
.
trackers
.
ContainsKey
(
trackerName
))
{
lock
(
this
.
lockReceivePacket
)
{
this
.
trackers
.
Add
(
trackerName
,
new
Tracker
());
if
(!
this
.
trackers
.
ContainsKey
(
trackerName
))
{
this
.
trackers
[
trackerName
].
DataUpdate
+=
this
.
DataUpdates
;
this
.
trackers
.
Add
(
trackerName
,
new
Tracker
());
this
.
trackers
[
trackerName
].
StatusUpdate
+=
this
.
StatusUpdates
;
this
.
trackers
[
trackerName
].
DataUpdate
+=
this
.
DataUpdates
;
this
.
trackers
[
trackerName
].
PanicUpdate
+=
this
.
PanicUpdates
;
this
.
trackers
[
trackerName
].
StatusUpdate
+=
this
.
StatusUpdates
;
}
this
.
trackers
[
trackerName
].
PanicUpdate
+=
this
.
PanicUpdates
;
if
(
binaryUpdate
.
Length
>
0
)
{
}
this
.
trackers
[
trackerName
].
SetUpdate
(
e
,
binaryUpdate
);
if
(
binaryUpdate
.
Length
>
0
)
{
}
this
.
trackers
[
trackerName
].
SetUpdate
(
e
,
binaryUpdate
);
if
(
binaryPanics
.
Length
>
0
)
{
}
this
.
trackers
[
trackerName
].
SetPanics
(
e
,
binaryPanics
);
if
(
binaryPanics
.
Length
>
0
)
{
}
this
.
trackers
[
trackerName
].
SetPanics
(
e
,
binaryPanics
);
if
(
textStatus
!=
""
)
{
}
this
.
trackers
[
trackerName
].
SetStatus
(
e
,
textStatus
);
if
(
textStatus
!=
""
)
{
}
this
.
trackers
[
trackerName
].
SetStatus
(
e
,
textStatus
);
if
(
textUpdate
!=
""
)
{
}
this
.
trackers
[
trackerName
].
SetUpdate
(
e
,
textUpdate
);
if
(
textUpdate
!=
""
)
{
this
.
trackers
[
trackerName
].
SetUpdate
(
e
,
textUpdate
);
}
}
}
}
}
});
});
...
...
This diff is collapsed.
Click to expand it.
Lora/Properties/AssemblyInfo.cs
View file @
d6796cf4
using
System.Reflection
;
using
System.Reflection
;
using
System.Resources
;
using
System.Resources
;
using
System.Runtime.InteropServices
;
using
System.Runtime.InteropServices
;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
// die einer Assembly zugeordnet sind.
[
assembly
:
AssemblyTitle
(
"Lora"
)]
[
assembly
:
AssemblyTitle
(
"Lora"
)]
[
assembly
:
AssemblyDescription
(
"Library that connects to a radio device and recieves lora traffic"
)]
[
assembly
:
AssemblyDescription
(
"Library that connects to a radio device and recieves lora traffic"
)]
[
assembly
:
AssemblyConfiguration
(
""
)]
[
assembly
:
AssemblyConfiguration
(
""
)]
[
assembly
:
AssemblyCompany
(
"Fraunhofer FIT"
)]
[
assembly
:
AssemblyCompany
(
"Fraunhofer FIT"
)]
[
assembly
:
AssemblyProduct
(
"Lora"
)]
[
assembly
:
AssemblyProduct
(
"Lora"
)]
[
assembly
:
AssemblyCopyright
(
"Copyright © 2018 - 31.05.2019"
)]
[
assembly
:
AssemblyCopyright
(
"Copyright © 2018 - 08.07.2019"
)]
[
assembly
:
AssemblyTrademark
(
"Fraunhofer FIT, BlubbFish"
)]
[
assembly
:
AssemblyTrademark
(
"Fraunhofer FIT, BlubbFish"
)]
[
assembly
:
AssemblyCulture
(
""
)]
[
assembly
:
AssemblyCulture
(
""
)]
[
assembly
:
NeutralResourcesLanguage
(
"de-DE"
)]
[
assembly
:
NeutralResourcesLanguage
(
"de-DE"
)]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[
assembly
:
ComVisible
(
false
)]
[
assembly
:
ComVisible
(
false
)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[
assembly
:
Guid
(
"85a78b05-5843-4e4d-8c56-4bcb12613750"
)]
[
assembly
:
Guid
(
"85a78b05-5843-4e4d-8c56-4bcb12613750"
)]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
//
// Hauptversion
// Hauptversion
// Nebenversion
// Nebenversion
// Buildnummer
// Buildnummer
// Revision
// Revision
//
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
// [assembly: AssemblyVersion("1.0.*")]
[
assembly
:
AssemblyVersion
(
"1.8.3"
)]
[
assembly
:
AssemblyVersion
(
"1.8.4"
)]
[
assembly
:
AssemblyFileVersion
(
"1.8.3"
)]
[
assembly
:
AssemblyFileVersion
(
"1.8.4"
)]
/*
/*
* 1.1.0 Now awaiing Battery as Double and fix the sending twise issue
* 1.1.0 Now awaiing Battery as Double and fix the sending twise issue
* 1.2.0 Restructure and remove old code
* 1.2.0 Restructure and remove old code
* 1.3.0 Status event and fileds added and refactoring
* 1.3.0 Status event and fileds added and refactoring
* 1.4.0 Implement Height in Lora
* 1.4.0 Implement Height in Lora
* 1.4.1 Fixing parsing bug with linebreaks
* 1.4.1 Fixing parsing bug with linebreaks
* 1.4.2 Adding test for LoraBinary
* 1.4.2 Adding test for LoraBinary
* 1.5.0 Add support for IC880A board
* 1.5.0 Add support for IC880A board
* 1.6.0 Fixing binary data transmission
* 1.6.0 Fixing binary data transmission
* 1.6.1 Update to local librarys
* 1.6.1 Update to local librarys
* 1.7.0 Add Parsing for new Statusformat and Panic Packet
* 1.7.0 Add Parsing for new Statusformat and Panic Packet
* 1.8.0 Add field that indicates when the last gps position was recieved, change all times to UTC
* 1.8.0 Add field that indicates when the last gps position was recieved, change all times to UTC
* 1.8.1 Add Hostname to MQTT, so you can see from witch device the data is recieved
* 1.8.1 Add Hostname to MQTT, so you can see from witch device the data is recieved
* 1.8.2 Bugfix, create also an event for sending normal loradata when update panic
* 1.8.2 Bugfix, create also an event for sending normal loradata when update panic
* 1.8.3 Refactoring and make using threads on event occours
* 1.8.3 Refactoring and make using threads on event occours
*/
* 1.8.4 Fixing a bug related to threaded working with data
*/
This diff is collapsed.
Click to expand it.
Lora/lib/IC880ALora.cs
View file @
d6796cf4
...
@@ -3189,7 +3189,16 @@ namespace Fraunhofer.Fit.Iot.Lora.lib {
...
@@ -3189,7 +3189,16 @@ namespace Fraunhofer.Fit.Iot.Lora.lib {
this.PinReset.Write(true);
this.PinReset.Write(true);
Thread.Sleep(150);
Thread.Sleep(150);
this.PinReset.Write(false);
this.PinReset.Write(false);
this
.
PinReset
.
PinMode
=
GpioPinDriveMode
.
Input
;
this.SingleSPI(0, 128);
this.SingleSPI(0, 0);
Thread.Sleep(32); // provide at least 16 cycles on CLKHS and 16 cycles CLK32M
this.SingleSPI(18, 1);
Thread.Sleep(42); // provide at least 4 cycles on CLKHS and 32 cycles CLK32M and 4 cycles on HOST_SCK
this.SingleSPI(18, 2);
Thread.Sleep(8); // provide at least 4 cycles CLK32M and 4 cycles on HOST_SCK
this.SingleSPI(0, 128);
this.SingleSPI(0, 0);
//this.PinReset.PinMode = GpioPinDriveMode.Input;
}
}
private void SetupIO() {
private void SetupIO() {
...
...
This diff is collapsed.
Click to expand it.