Revision 365
corrected error on chat
proj/project/src/chat.c | ||
---|---|---|
137 | 137 |
hltp_send_string(buffer); |
138 | 138 |
char buffer2[CHAT_MAX_SIZE+3] = "> "; |
139 | 139 |
strncat(buffer2, buffer, strlen(buffer)); |
140 |
for(size_t j = CHAT_MAX_NUM-1; j; --j) text_set_string(t_text[i], text_get_string(t_text[i-1])); |
|
140 |
for(size_t j = CHAT_MAX_NUM-1; j; --j){ |
|
141 |
text_set_string(t_text[j], text_get_string(t_text[j-1])); |
|
142 |
} |
|
141 | 143 |
text_set_string(t_text[0], buffer2); |
142 | 144 |
for(size_t j = 0; j < CHAT_MAX_NUM; ++j){ |
143 | 145 |
if(text_get_string(t_text[j])[0] == '>'){ |
proj/report/report.tex | ||
---|---|---|
1 |
\documentclass{article} |
|
2 |
% Hyperreferences |
|
3 |
\usepackage{hyperref} |
|
4 |
% Margins |
|
5 |
\usepackage[top=35mm,bottom=35mm,left=25mm,right=25mm]{geometry} |
|
6 |
% Graphics and images |
|
7 |
\usepackage{graphicx} |
|
8 |
\graphicspath{{./images/}} |
|
9 |
% Encodings (to render letters with diacritics and special characters) |
|
10 |
\usepackage[utf8]{inputenc} |
|
11 |
% Language |
|
12 |
\usepackage[english]{babel} |
|
13 |
% Section pagebreaks |
|
14 |
\usepackage{titlesec} |
|
15 |
\newcommand{\sectionbreak}{\clearpage} |
|
16 |
\newcommand{\sectionnobreak}{% for when I want a section that does not break |
|
17 |
\global\toggletrue{afterpart}% |
|
18 |
\section |
|
19 |
} |
|
20 |
% Source code |
|
21 |
\usepackage{listings} |
|
22 |
\usepackage{xcolor} |
|
23 |
\renewcommand{\lstlistingname}{File} |
|
24 |
\lstset{ |
|
25 |
frame=tb, % draw frame at top and bottom of the code |
|
26 |
tabsize=4, % tab space width |
|
27 |
numbers=left, % display line numbers on the left |
|
28 |
showstringspaces=false, % don't mark spaces in strings |
|
29 |
commentstyle=\color{green}, % comment color |
|
30 |
keywordstyle=\color{blue}, % keyword color |
|
31 |
stringstyle=\color{red} % string color |
|
32 |
} |
|
33 |
\lstdefinelanguage{Maxima}{ |
|
34 |
keywords={log,jacobian,determinant,subst}, |
|
35 |
sensitive=true, |
|
36 |
comment=[n][\itshape]{/*}{*/} |
|
37 |
} |
|
38 |
% Tables with bold rows |
|
39 |
\usepackage{tabularx} |
|
40 |
\newcommand\setrow[1]{\gdef\rowmac{#1}#1\ignorespaces} |
|
41 |
\newcommand\clearrow{\global\let\rowmac\relax} |
|
42 |
\clearrow |
|
43 |
% Math stuff |
|
44 |
\usepackage[mathscr]{euscript} |
|
45 |
\usepackage{amsmath,amssymb} |
|
46 |
\usepackage{mathtools} |
|
47 |
\usepackage{enumitem} |
|
48 |
\newcommand{\expnumber}[2]{{#1}\mathrm{e}{#2}} % scientific notation |
|
49 |
% Definitions, theorems, remarks,... |
|
50 |
\usepackage{amsthm} |
|
51 |
\newtheorem{definition}{Definition}[section] |
|
52 |
\newtheorem{theorem}{Theorem}[section] |
|
53 |
\newtheorem{corollary}{Corollary}[theorem] |
|
54 |
\newtheorem{lemma}[theorem]{Lemma} |
|
55 |
\renewcommand\qedsymbol{$\blacksquare$} |
|
56 |
\theoremstyle{remark} |
|
57 |
\newtheorem*{remark}{Remark} |
|
58 |
% Contents title |
|
59 |
\addto\captionsenglish{\renewcommand*\contentsname{Table of contents}} |
|
60 |
% Headers and footers |
|
61 |
\usepackage{fancyhdr} |
|
62 |
\pagestyle{fancyplain} |
|
63 |
\fancyhf{} |
|
64 |
\lhead{ \fancyplain{}{LabWars - Final report (LCOM 2019/20)}} |
|
65 |
\lfoot{ \fancyplain{}{T5G03}} |
|
66 |
\rfoot{ \fancyplain{}{\thepage} } |
|
67 |
% |
|
68 |
\newcommand{\email}[1]{ |
|
69 |
{\texttt{\href{mailto:#1}{#1}} } |
|
70 |
} |
|
71 |
\newcommand{\role}[1]{ |
|
72 |
\begin{tabular}{l l} |
|
73 |
\begin{minipage}[t]{30mm} \textbf{Roles} \end{minipage} & |
|
74 |
\begin{minipage}[t]{125mm} #1 \end{minipage} |
|
75 |
\end{tabular}\\ |
|
76 |
} |
|
77 |
\newcommand{\func}[1]{ |
|
78 |
\begin{tabular}{l l} |
|
79 |
\begin{minipage}[t]{30mm} \textbf{Functionalities} \end{minipage} & |
|
80 |
\begin{minipage}[t]{125mm} #1 \end{minipage} |
|
81 |
\end{tabular}\\ |
|
82 |
} |
|
83 |
% Metadata |
|
84 |
\title{\Huge LabWars \\ \Large Final report \\ \vspace*{4pt} \large LCOM 2019/20} |
|
85 |
\author{ |
|
86 |
T5G03\\ |
|
87 |
\begin{tabular}{r l} |
|
88 |
\email{up201806429@fe.up.pt} & Diogo Miguel Ferreira Rodrigues \\ |
|
89 |
\email{up201806554@fe.up.pt} & Telmo Alexandre Espirito Santo Baptista |
|
90 |
\end{tabular} |
|
91 |
} |
|
92 |
\date{06/01/2020} |
|
93 |
% Document |
|
94 |
\begin{document} |
|
95 |
%\begingroup |
|
96 |
\maketitle |
|
97 |
% \let\clearpage\relax |
|
98 |
% \setcounter{tocdepth}{2} |
|
99 |
\tableofcontents |
|
100 |
%\endgroup |
|
101 |
\section{User instructions} |
|
102 |
\subsection{Main menu} |
|
103 |
On startup, users are greeted by a \texttt{Loading...} message, briefly followed by the main screen. |
|
104 |
\begin{center} \includegraphics[scale=0.45]{main_menu} \end{center} |
|
105 |
|
|
106 |
\subsection{Chat} |
|
107 |
This chat tool was initially designed as a simple, text mode, test communication between different machines. We have however decided to include it as a functionality in the project for a number of reasons: |
|
108 |
\begin{enumerate} |
|
109 |
\item It was easy to develop the graphical part and integrate in the project. |
|
110 |
\item Having a friendly functionality that uses the communication modules allows for faster debugging; in case the computers are not properly connected, or if during development something stops working we can immediately check if the communication modules also stopped working. |
|
111 |
\item It served as a minimal insurance that our project would integrate the communication modules, in case we could not implement multiplayer mode. |
|
112 |
\item It is a useful feature. |
|
113 |
\end{enumerate} |
|
114 |
|
|
115 |
\section{Project status} |
|
116 |
Hey |
|
117 |
\section{Code organization/structure} |
|
118 |
Hey |
|
119 |
\section{Implementation details} |
|
120 |
Hey |
|
121 |
\section{Conclusions} |
|
122 |
Hey |
|
123 |
\end{document} |
|
0 | 124 |
proj/Makefile | ||
---|---|---|
12 | 12 |
SRCS= list.c queue.c graph.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c fast_math.c xpm_utils.c rtc.c uart.c makecode_map.c menu.c proj_func.c rectangle.c font.c ent.c proj.c hltp.c zombies.c campaign.c singleplayer.c chat.c scoreboards.c |
13 | 13 |
IPATHS=-I./project/include -I./libs -I./libs/graph/include -I./libs/kbc/include -I./libs/rtc/include -I./libs/timer/include -I./libs/uart/include -I./libs/classes/include -I./libs/utils/include -I./maps -I./media/xpm |
14 | 14 |
|
15 |
CPPFLAGS += -pedantic ${IPATHS} -D LCOM_MACRO -D __LCOM_OPTIMIZED__ -Wall -Wextra -Wshadow -Wunreachable-code #-Weverything -Wno-padded -Wno-unused-macros |
|
15 |
CPPFLAGS += -pedantic ${IPATHS} -D LCOM_MACRO #-D __LCOM_OPTIMIZED__ -Wall -Wextra -Wshadow -Wunreachable-code #-Weverything -Wno-padded -Wno-unused-macros
|
|
16 | 16 |
|
17 | 17 |
DPADD += ${LIBLCF} |
18 | 18 |
LDADD += -llcf |
Also available in: Unified diff