Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Smart Grid Modell
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Armin Co
Smart Grid Modell
Commits
60038ac8
Commit
60038ac8
authored
Aug 29, 2020
by
Armin Co
Browse files
Options
Downloads
Patches
Plain Diff
Show all Warnings
parent
b0cb49e6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+2
-0
2 additions, 0 deletions
CMakeLists.txt
src/i2c/Node.cpp
+2
-2
2 additions, 2 deletions
src/i2c/Node.cpp
src/i2c/Node.hpp
+2
-2
2 additions, 2 deletions
src/i2c/Node.hpp
with
6 additions
and
4 deletions
CMakeLists.txt
+
2
−
0
View file @
60038ac8
...
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.6)
...
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.6)
project
(
SmartGridModell
)
project
(
SmartGridModell
)
set
(
CMAKE_CXX_STANDARD 11
)
set
(
CMAKE_CXX_STANDARD 11
)
add_compile_options
(
-Wall -Wextra -pedantic
)
# Add spdlog for nice and easy logging
# Add spdlog for nice and easy logging
add_subdirectory
(
libs/spdlog
)
add_subdirectory
(
libs/spdlog
)
...
...
This diff is collapsed.
Click to expand it.
src/i2c/Node.cpp
+
2
−
2
View file @
60038ac8
...
@@ -41,9 +41,9 @@ bool Node::open_device(const char* i2c_device_name)
...
@@ -41,9 +41,9 @@ bool Node::open_device(const char* i2c_device_name)
bool
Node
::
send
(
uint8_t
*
data
,
size_t
size
)
bool
Node
::
send
(
uint8_t
*
data
,
s
size_t
size
)
{
{
auto
bytes_written
=
write
(
m_device
,
data
,
size
);
ssize_t
bytes_written
=
write
(
m_device
,
data
,
size
);
if
(
bytes_written
!=
size
)
if
(
bytes_written
!=
size
)
{
{
spdlog
::
error
(
"Error while writing bytes. Written {} bytes instead of {}!"
,
bytes_written
,
size
);
spdlog
::
error
(
"Error while writing bytes. Written {} bytes instead of {}!"
,
bytes_written
,
size
);
...
...
This diff is collapsed.
Click to expand it.
src/i2c/Node.hpp
+
2
−
2
View file @
60038ac8
...
@@ -40,7 +40,7 @@ public:
...
@@ -40,7 +40,7 @@ public:
/// @param data Data that should be written
/// @param data Data that should be written
/// @return If write operation was successfull
/// @return If write operation was successfull
//
//
bool
send
(
uint8_t
*
data
,
size_t
size
);
bool
send
(
uint8_t
*
data
,
s
size_t
size
);
bool
send
(
std
::
vector
<
uint8_t
>
&
data
);
bool
send
(
std
::
vector
<
uint8_t
>
&
data
);
bool
send
(
std
::
array
<
uint8_t
,
2
>
&
data
);
bool
send
(
std
::
array
<
uint8_t
,
2
>
&
data
);
bool
send
(
uint8_t
reg
,
uint8_t
val
);
bool
send
(
uint8_t
reg
,
uint8_t
val
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment